Syntax highlighting with the code slice

Hi Mohammad,

The guide you followed is only for the content modelling side on Prismic for your code snippets. You will still need to configure the styling on your frontend side in whatever technology you are using. The easiest way to do this is to use a code styling library like https://highlightjs.org/ or https://prismjs.com/ .

This thread shows how a user did this in Gatsby

Thanks.

1 Like