-
Notifications
You must be signed in to change notification settings - Fork 132
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 extending nbsphinx-rst.tpl #132
Comments
Thanks for the suggestion! Regarding the template files, I'd prefer not to expose those too much, because I would like to get rid of them in the long run. I still hope that at some point we can realize #36, and with that the template-based converter will have to go. Having some other mechanism to put content to the top or the bottom of the page would be great though, probably something similar to |
@adrn I've just released version 0.3.0, which includes the options |
Ah yes, this looks like it would work for what we needed! I think it would still be worth thinking about allowing custom templates, but that is a low priority request... Thanks! |
I'm leaning against allowing custom templates, because I'm planning to switch away from a template-based converter in the long run. |
I've been thinking about custom templates as well. I'd like to be able to hide cell input by modifying the input block to:
Seems like this would be easy to do if I could write a custom template that extends nbsphinx-rst.tpl and put it in the _templates directory(?) but I'm struggling with the same issue as @adrn. |
Over in astropy/astropy-tutorials, we'd like to add a link to the bottom of each sphinx page generated from a notebook (and only these) that contains a link to the source notebook on github. Maybe there is an easier way, but my initial thought was to add a new section to the jinja template that generates the page. But, it looks like that is hard-coded into
nbsphinx.py
as a string. Ifnbsphinx
was restructured into a package, I think it could support custom .tpl files as well via an, e.g.,nbsphinx_custom_tpl
option inconf.py
. I tried to spec this out on my own fork ofnbsphinx
, but got stuck on paths (trying to get the custom template to know about the nbsphinx template, and to get nbsphinx to find the custom template in, e.g., the_static
path of the sphinx source directory). Any thoughts or ideas on this? Thanks!cc @eteq
The text was updated successfully, but these errors were encountered: