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

Feature request: warnings about languages not highlighted by the shipped script? #1035

Open
favonia opened this issue Nov 9, 2023 · 1 comment

Comments

@favonia
Copy link
Contributor

favonia commented Nov 9, 2023

Hi, I wonder if odoc can give a warning about the language tags not supported by the shipped highlightjs script. An even better option might be vendoring files in https://github.com/highlightjs/cdn-release/tree/main/build/languages and ship exactly the scripts for languages used in the documentation, completely solving #951 and #953.

@favonia favonia changed the title Warning about languages _not_ highlighted by the shipped highlightjs? Feature request: warnings about languages _not_ highlighted by the shipped script? Nov 9, 2023
@favonia favonia changed the title Feature request: warnings about languages _not_ highlighted by the shipped script? Feature request: warnings about languages not highlighted by the shipped script? Nov 9, 2023
@Julow
Copy link
Collaborator

Julow commented Jan 22, 2024

Shipping only the required languages is challenging as while Odoc outputs the support files (with the command odoc support-files) it doesn't consider the documentation that have been built.

Emitting a warning is possible but I'm not sure it's a good solution as the driver (odig, dune, ocaml.org) is free to ship a different highlightjs.js.

Perhaps odoc support-files could take a list of the required language highlightings as an argument ? But I'm not sure how/if that would be used by drivers.

If you are publishing your own documentation, providing your own highlightjs.js is the only short term solution that I see.

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

No branches or pull requests

2 participants