holoviz-dev / nbsite

Build a tested, sphinx-based website from notebooks
https://nbsite.holoviz.org
BSD 3-Clause "New" or "Revised" License
28 stars 13 forks source link

Dedicated holoviz static files (template + CSS) #212

Open maximlt opened 2 years ago

maximlt commented 2 years ago

Most of the holoviz websites are now built upon the pydata sphinx theme that is slightly adapted to look how we want by extending parts of its template and overriding/extending its CSS. This means that each project has a custom template and a custom CSS file. I think that actually most of this code could be shared among all the Holoviz projects.

The template should be one file living in one place only. It could be customized by passing standardized variables to the jinja templating engine, for instance if a project doesn't require displaying a link to binder in the right side bar it could pass binder_link=False to the html_context dictionary in conf.py.

Most of the CSS could also be shared among all projects. Each project would then have just a tiny custom.css file (or we might want go even further and clearly define the few things we want to customize per project, template them in some way and have them configured in conf.py, I'm thinking about the link colors for instance).

We could have two files in nbsite/_shared_static - holoviz.css and holoviz.html (it may be required to name the latter layout.html, I'm not sure) - not to force nbsite users to follow our requirements. But to be honest I'd rather just clearly state that nbsite is meant to be a holoviz-dev tool only and that users should feel free to fork it if they want to use it for their own purpose. In doing so I would be much more confident making proper releases of nbsite instead of just pushing alpha releases. This would have an advantage I think, in our docs builds we rely on the channel pyviz/label/dev while I'd prefer to rely on pyviz only or conda-forge only (when it's required).

jbednar commented 2 years ago

That all sounds good to me! I think a holoviz template and CSS could be included in this project without making this project unusable for other sites, if anyone is doing that. Such templates act as an example of how to manage a family of related projects, which is useful to document anyway. In any case, I don't think we have any reason to keep using alpha releases only; we should release when it's useful!