Pygments coexisting with JS syntax hightlighting #5365
Replies: 2 comments 4 replies
-
Hi @jonaprieto , You state that some of your pages require Highlight.js First, create a file named
In your
In this way, the You can then enable Highlight.js on specific pages using the highlight.html file. For this process, you need to include the highlight.html file on the page by using the include command in the content of the page. However, using two different highlighting methods on the same page can cause some compatibility issues, so I recommend using only one highlighting method on your pages. As I mentioned before, I haven't done anything like this before, but I think it might be useful for you. |
Beta Was this translation helpful? Give feedback.
-
I'm not 100% on this, but I assume it's possible to access the instance of the I'm unsure about the restoration part, because it might not work if the page events are being run concurrently and share the same Highlight class instance. It might also be the case that the restoration isn't needed at all because each page could be getting their own Highlight class instance. 🤔 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use syntax highlighting Pygments globally. However,
I do have a few pages that require Highlight.js. As far as I see
in the docs, this use case is not covered, is it?
How can I achieve that? Is it possible?
Beta Was this translation helpful? Give feedback.
All reactions