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?
to your account
If you install the package from npm, the built file has all languages.
How is it possible to use only some languages?
The text was updated successfully, but these errors were encountered:
Sure. You can pass languageSubset as a parameter for highlightAuto(): http://highlightjs.readthedocs.io/en/latest/api.html#highlightauto-value-languagesubset
Sorry, something went wrong.
in index.js we have a ton of calls to require:
var hljs = require('./highlight');
As far as I understand we can just avoid index.js and include highlight.js directly and then call registerLanguage for the languages we actually need?
Here's my complete example which is working for me
var hljs = require("highlight.js/lib/highlight.js");
Thanks, @Remo. This was incredibly helpful. Would love to see it documented on the website or README.
This is in the README now.
Successfully merging a pull request may close this issue.