colbyfayock / next-wordpress-starter

📝 Bring WordPress to the static world with Next.js
https://next-wordpress-starter.spacejelly.dev
MIT License
1.2k stars 291 forks source link

Add stylized code snippets #6

Open colbyfayock opened 4 years ago

colbyfayock commented 4 years ago

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

doingandlearning commented 3 years ago

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.

colbyfayock commented 3 years ago

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 commented 3 years ago

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