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

Provide the ability to add additional-js files above book.js (to support custom language highlights) #2505

Open
rix0rrr opened this issue Dec 11, 2024 · 0 comments
Labels
C-enhancement Category: Enhancement or feature request

Comments

@rix0rrr
Copy link

rix0rrr commented Dec 11, 2024

Problem

This is a re-open of #1870. That issue was closed without addressing the underlying problem.

I want to add syntax highlighting for a custom, not super popular language (Alloy).

I can write my own custom JS file with:

hljs.registerLanguage(...);

But I cannot get mdbook to include my custom JS file before it initializes the page.

Proposed Solution

Include additional-js BEFORE book.js. Or provide a different key which can be used for scripts that should be included before book.js.

Notes

No response

@rix0rrr rix0rrr added the C-enhancement Category: Enhancement or feature request label Dec 11, 2024
@rix0rrr rix0rrr changed the title Provide the ability to add additional-js files above book.js in index.html (to support custom language highlights) #1870 Provide the ability to add additional-js files above book.js in index.html (to support custom language highlights) Dec 11, 2024
@rix0rrr rix0rrr changed the title Provide the ability to add additional-js files above book.js in index.html (to support custom language highlights) Provide the ability to add additional-js files above book.js to support custom language highlights) Dec 11, 2024
@rix0rrr rix0rrr changed the title Provide the ability to add additional-js files above book.js to support custom language highlights) Provide the ability to add additional-js files above book.js (to support custom language highlights) Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

1 participant