I’ve been using Jupyter Books to write docs for a while now. E.g. for this model: https://microplastics-cluster.github.io/fragment-mnp/. I’ve gone for hosting on GitHub Pages as this seemed like a straightforward option, but it has the downside that - as far as I can tell - it’s not possible to have versioned docs.
It looks like the only way to get versioned Jupyter Books is to use Read the Docs, which is only free if you don’t mind some low-key advertising (or pay $5/month). Does anyone have any experience using Jupyter Books with Read the Docs, or alternatively, know of any other solutions to versioned Jupyter Books? Whilst I don’t necessarily mind some low-key adverts, in an ideal world I would prefer a (free) solution without - but maybe I am asking too much there!
Do you mean versioning like you get on Read the Docs, where you can choose to look at the docs for v1.2 or v0.3 or latest?
I have wanted to do this for our sphinx-based TopoToolbox documentation, and my research a little while ago didn’t turn up anything that seemed like it would work without a ton of fiddling with sphinx and our CI setup.
the technology we used in the workshop in the Lake District is based on the teachbook framework (https://teachbooks.github.io/). That will generate a seperate page for each branch in your repo. If you make sure that old releases are kept as branches, that would be a easy fix?
It could probably also be configured to build tags (i.e. releases) as well as branches. However, they would be rebuilt once the github cache is expired.
@samharrison7 I was actually trying to figure out this exact problem just this morning! When we moved our Landlab docs from landlab.rtfd.io to landlab.csdms.io we lost the capability to switch between versions of the docs. This means that people now see the docs for the latest development version, not the latest release that would get from PyPI or conda-forge.
MkDocs is easier to work with than Sphinx in some ways, but Python API docs don’t look as clear with it sadly.
This is because it uses markdown as an intermediary format (python code → markdown → html docs). Sphinx uses RST which is more versatile, but also more of a hassle when writing normal docs.
We’ve started to switch from writing our documentation in reStructuredText to writing it in myst, which is really just markdown, and then using the myst_sphinx extension. The docs look the same but, in my opinion, myst is so much easier to write.