next-wordpress-starter icon indicating copy to clipboard operation
next-wordpress-starter copied to clipboard

Add stylized code snippets

Open colbyfayock opened this issue 5 years ago • 3 comments

We should take advantage of libraries that allow us to provide syntax highlighting to code blocks. This may depend on moving to using Blocks for content https://github.com/colbyfayock/next-wordpress-starter/issues/4

Questions

  • How can this be configured within the content editor?

colbyfayock avatar Oct 01 '20 02:10 colbyfayock

So, Jason might also have the solution for this! :)

https://github.com/wp-graphql/wpgraphql.com/blob/master/src/components/parse-html.js

This is his parsing function. I want to dig in and to see how to abstract this to the starter.

doingandlearning avatar Jan 13 '21 20:01 doingandlearning

I did some parsing in my spacejelly.dev site that can also use as inspiration: https://github.com/colbyfayock/spacejelly.dev/blob/main/src/pages/posts/%5Bslug%5D.js#L128 https://github.com/colbyfayock/spacejelly.dev/blob/28cff627a9dbd1f31aee667944a9831328277a7d/src/lib/parse.js#L44

colbyfayock avatar Jun 09 '21 12:06 colbyfayock

if any work here is done it should be in a way that makes it easy to add new configurations and transformations in a plugin-able way

colbyfayock avatar Jun 09 '21 12:06 colbyfayock