Skip to content
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

Add documentation on how to add a highlight.js for additional syntax highlighting support #1976

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DrTobe
Copy link

@DrTobe DrTobe commented Jan 2, 2023

This adds a few lines on how a custom version of highlight.js can be obtained and made available to mdbook. With that information available, all issues about adding support for a specific language should be safe to be closed because mdbook in its default setup probably does not need to support every possible language.

I have seen that there are ongoing efforts to move away from highlight.js but I guess this information may nevertheless be useful in the meantime.

@max-sixty
Copy link
Contributor

Would be good to merge this!

@ehuss
Copy link
Contributor

ehuss commented May 8, 2023

Unfortunately I don't think just using the highlight.js website will completely work. mdBook is incompatible with newer versions of highlight.js (such as #1622). https://github.com/rust-lang/mdBook/blob/master/CONTRIBUTING.md#updating-highlightjs contains some instructions for building it from source, where you can check out a version from the 10.x series.

@DrTobe
Copy link
Author

DrTobe commented May 8, 2023

I just proposed to add this because it took me quite some time to figure this out and it solved our specific problem. So I still think some kind of documentation like this might be valuable but you are right that we should not include it like that if it is not 100% correct. So what specific approach do you propose?

@ehuss
Copy link
Contributor

ehuss commented May 8, 2023

I'm not sure, but one suggestion might be to copy the first four steps from the contributing guide to this page instead of recommending going to the website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants