-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade highlight.js in the highlight plugin to the latest version #2562
Comments
Actually the I found several issues on this subject, maybe we should not bundle highlight.js and/or provide a way to replace it with a newer version? |
I would also like to see more highlight.js options as options in the Reveal config. In my case I would like to change the tabReplace value. Right now, some options are passed, but not all. Something like:
|
reveal.js 3.9 is out and includes highlight.js 9.18.0. I agree it'd be great to make it easier to upgrade this separately. One of the appeals of reveal.js for many people is that it requires virtually no setup to get started—you can download the repo and edit the index.html file without needing to npm install or set up a web server. That said I'm cautious about making adding any extra steps to get something like code highlighting working. Loading from a CDN could be a good option. |
Awesome, thanks @hakimel 👍
Indeed and I think we should keep it that way. Syntax highlighting should work out-of-the-box.
We can use cdn.jsdelivr.net but this prebuilt version of highlight.js only contains the 34 most commonly used languages. Please note that it's possible to load additional languages from https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/languages/. highlight: {
languages: ['arduino', 'elm', 'x86asm'],
tabReplace: ' '
} |
As of version 4.0 we no longer have a hard coded copy of highlight.js inside of the reveal.js repo. Instead highlight.js is installed as an npm dependency, which will make it much easier to upgrade going forward. We're currently using highlight.js 10.0.3. I still think it'd be useful to let people configure a smaller subset of highlight.js languages to decrease the file size, or load highlight.js from another origin but this issue is ✅ |
I've found out a (hacky) way of settings
And then pass |
I am using hugo and are loading reveal inside the html (using go module dependency). Is there a way to override the highlightjs version without using npm? |
The highlight plugin relies on Highlight.js 9.11.0.
I think we should use the latest version available 9.17.1: https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md#version-9171
The text was updated successfully, but these errors were encountered: