DEV Community

Chloe
Chloe

Posted on

PrismJS

I've added PrismJS as a plugin to my Gridsome blog for code formatting (as like most I write my posts in markdown) when I run this locally it works fine, but on the live published posts it doesn't. Anyone with some experience with this that might be able to shed some light?

I've added it as a plugin to gridsome.config.js under transformers plugins:

plugins: ['@gridsome/remark-prismjs']
Enter fullscreen mode Exit fullscreen mode

and imported a theme into my main.js file:

import "prismjs/themes/prism-dark.css"
Enter fullscreen mode Exit fullscreen mode

which works fine when I use gridsome develop locally but once psoted this highlighting disappears. Am I missing a step somewhere?

Thanks in advance

Top comments (1)

Collapse
 
dmtrshat profile image
Dmitry Shatokhin

Hi
You can contact me and we will try to solve this problem ;)