Now testing: Syntax highlighted code blocks

Updated July 10, 2021

So um, they don't actually work yet, because of a theming issue... I'll get to it later.

exports.onCreateNode = ({ node, getNode, actions }) => {
  const { createNodeField } = actions;
  if (node.internal.type === `Mdx`) {
    const value = createFilePath({ node, getNode });
    console.log(value);
    createNodeField({
      name: `slug`,
      node,
      value,
    });
  }
};