Skip to content

Is it possible to add syntax coloring? #16

@cpmooney

Description

@cpmooney

Is it possible to enable syntax coloring in this example?

I installed rehype-highlight and followed https://www.contentlayer.dev/docs/reference/source-files/make-source-a5ba4922#mdx to get this:

export default makeSource({
  contentDirPath: "./content",
  documentTypes: [Post, Page],
  mdx: {
    rehypePlugins: [highlight],
  }
})

This has not worked for me so there must be more involved. Any idea about what that might be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions