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

Support javascript/CSS extensions in the HTML export #1571

Closed
nthiery opened this issue Oct 5, 2024 · 3 comments
Closed

Support javascript/CSS extensions in the HTML export #1571

nthiery opened this issue Oct 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@nthiery
Copy link
Contributor

nthiery commented Oct 5, 2024

JupyterBook/sphinx makes it easy to extend the HTML export by providing javascript and CSS files that should be loaded in the HTML files: if a javascript file foo.js is dropped in the _static directory, then it's automatically added to the export directory, and a <script> tag is added all generated html files to load it. Same for a CSS file.

Proposal

  1. Provide any equivalent mechanism.
  2. (bonus) provide the exact same mechanism to easy transition.

Use case

In my course notes, I am using a custom js/css extension that adds two sliders in the top bar to choose whether to display solutions and/or instructor notes which is much more convenient than having separate versions of the documents.

Being able to quickly hack such extensions empowers users to explore features they would want to have, until they become official features.

@choldgraf: maybe this issue could be added to #189?

@nthiery nthiery added the enhancement New feature or request label Oct 5, 2024
@nthiery
Copy link
Contributor Author

nthiery commented Oct 10, 2024

Oh, yes; thanks @choldgraf ! And I had even commented on those. Apparently I have a very short memory, and I failed my searches before creating a new issue :-) Sorry for the noise.

This issue can be closed, up maybe to a tiny action: mentioning in the above issues, and as source of inspiration, the sphinx approach
of simply throwing the css/js files in _static.

@choldgraf choldgraf closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants