Closed prjemian closed 1 year ago
The problem is conflict between pydata-sphinx-theme and new Sphinx 6.0 release. Restrict sphinx<6 (for now).
Added light & dark logos and remove restriction to avoid the problem reported above.
Need a cache of documentation for previous versions.
Looking at a structure such as:
BASE_URL
./ --> redirects to 1.0.4
dev
1.0.4 <-- latest
1.0.3
1.0.1
1.0.0
Older versions may not have the dropdown to switch versions. (Because they do not use that theme, or some other reason(s).)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="15; url='https://prjemian.github.io/pysumreg/'" />
</head>
<body>
<p>
Click <a href="https://prjemian.github.io/pysumreg/1.0.4/">here</a>
or wait 15 seconds to redirect automatically to documentation of
the latest release.
</p>
</body>
</html>
Manually created the structure on gh-pages
branch and pushed. The dropdown is not working yet. Also the _static/switcher.json
file must be moved.
Ran existing actions workflow to re-publish the standard way (clears the temporary structure).
After building the html docs for a release, create a .tar.gz
file and add it to the release assets. Such as pysumreg-docs-1.0.0.tar.gz
for release 1.0.0.
Need a script/something to use in the pages
workflow:
mktemp
)sphinx-build -M html ./docs/source /tmp/tmp.XXXXXX
)dev
subdirectory (mv /tmp/tmp.XXXXXX/build/html /tmp/tmp.XXXXXX/dev
)switcher.json
file accordinglydev
to the appropriate versionlatest
to the appropriate versionThen use the GHA action to post this directory to gh-pages
.
Limit the number of old documentation versions to 5-10.
Instead of rebuilding (or downloading an unzipping) all old documentation versions, consider downloading the existing gh-pages
branch and rebuilding on top of that.
wget https://github.com/prjemian/pysumreg/archive/refs/heads/gh-pages.zip
Almost ready.
The dropdown is not working yet.
Still a problem.
Other relevant pydata-sphinx-theme version switcher implementations:
Review this trail of PRs: https://github.com/numpy/numpy/pulls?q=is%3Apr+switcher+is%3Aclosed
For a simplified example, watch this project: https://github.com/prjemian/demo2301
demo2301 is ready, see https://prjemian.github.io/demo2301/1.0.0/index.html
prototype for https://github.com/BCDA-APS/apstools/issues/713