-
Notifications
You must be signed in to change notification settings - Fork 197
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
FEA Integrate download links and binder/juputerlite buttons with pydata-sphinx-theme
secondary sidebar
#1258
Comments
I haven't thought very deeply about this yet, but off the cuff I would say option 3 is attractive if there's a way to make it work seamlessly for both PST sites and sites that use other themes. Sphinx has a That said, I think it's possible (though a bit ugly perhaps) to do the integration in the theme's code rather than here in sphinx-gallery. If sphinx-gallery can agree to coordinate with pydata-sphinx-theme on the stability of a few key CSS class names or HTML IDs, that might be enough. Then at the theme level, we can make components containing those elements (so users could place them where they wish) and the components could include some JS that would remove the element from it's default location where sphinx-gallery put it. I think that would be enough to get you both (1) and (2). |
Given the popularity of
pydata-sphinx-theme
within the community nowadays, I'm requesting to see if it is possible to have some theme-specific configurations for better integration. In particular,pydata-sphinx-theme
has a secondary sidebar where we can put the download links (Python source code and Jupyter notebook) and Binder/JupyterLite buttons. This way we no longer need the "Go to the end" note at the top and the footer at the bottom. This idea comes up when switchingscikit-learn
docs topydata-sphinx-theme
, see scikit-learn/scikit-learn#28415 for discussion and check its rendered docs here.Is it possible to:
(1) Provide a configuration option to remove the top note and the footer.
(2) Expose API to get Binder/JupyterLite/download links (href) (and maybe badge image links (src) as well). I notice that there are things like
interactive_example.gen_binder_url
, but in particular I mean functions/variables added to the page context duringsphinx
build that can be directly called/accessed from Jinja templates (see the documentation). In this way users can easily create their ownpydata-sphinx-theme
components to put into the secondary sidebar.Ideally, one can create templates like:
and
(3) An alternative to (2) is that, directly create
pydata-sphinx-theme
components (templates) and ship them with the library. Then figure out a way forpydata-sphinx-theme
to discover that template (see the guide). This saves users' effort but I'm not sure if this is possible.The text was updated successfully, but these errors were encountered: