Use mike to versionise the website. - #538
Conversation
Add `mike` as a documentation dependency and configure mkdocs to use it. This allows to versionise the entire website.
6721cbd to
6d8cd01
Compare
|
Alternatively, if you don’t want to have to bother with saving the state of the $ uv run mike deploy -b test-mike dev
$ uv run mike set-default -b test-mike dev
...
$ poetry run mike deploy -b test-mike 1.0
...
$ uv run mike serve -b test-mikeAnd then delete the |
I created and pushed a
$ git branch -t versionise-entire-website origin/versionise-entire-website
$ git checkout versionise-entire-website
$ git branch -t test-mike origin/test-mike
$ uv run mike serve -b test-mikeAnd browse the versionised website on |
matentzn
left a comment
There was a problem hiding this comment.
This is fantastic. I tested it locally and it works great! Minor hypothetical comment,
|
Of note, before that PR is merged, we should merge the |
Before actually trying to deploy the documentation, make sure to configure a Git username and Git email. This was previously taken care of automatically by `mkdocs gh-deploy`, but `mike` apparently does not do that.
cthoyt
left a comment
There was a problem hiding this comment.
I didn't look into this carefully, but it's Friday so it's the perfect time to ![]()
|
this inadvertently broke the SSSOM schema PURLs like https://w3id.org/sssom/mapping_source, which still point to |
Following #538, this PR rebuilds all artifacts with `make gen-project`
Resolves [#530]
docs/have been added/updated if necessarymake testhas been run locallytests have been added/updated (if applicable)CHANGELOG.md has been updated.This PR configures MkDocs to use mike in order to create a fully versionised website.
Edit: Forget what’s below, unless you want for some reason to test the entire procedure for yourself. Go directly to that comment if you just want to see what the result would look like.
Full procedure for generating the versionised website for testing:
To test the result:
gh-pagesbranch locally tracked in your local repo. If not:$ git branch -t gh-pages origin/gh-pagesgh-pagesbranch (so that you can easily revert all the changes you’ll have to do on that branch in order to test the versionised website):$ git tag savepoint gh-pagesgh-pagesbranch$ uv run mike delete --alldevversion of the documentation:$ make gendocdevversion of the documentation and set it as the default version:Now you need to build the website for version 1.0:
$ git checkout v1.0.0Amend
pyproject.tomlto addmiketo thedocsdependency group and amendmkdocs.ymlto add themikeconfiguration (as is done on this PR, but now you need to back port that to your local checkout of the v1.0.0 tag).Build the documentation for version 1.0. Remember that we were not using
uvyet back in 1.0, so you must make sure you still have Poetry around:$ make gendoc$ poetry run mike deploy 1.0versionise-entire-websitebranch (strictly speaking not necessary, but this allows to be able to useuvback and avoid having to use Poetry more than strictly necessary):$ git checkout versionise-entire-website$ uv run mike serveYou can now browse the versionised website on
https://localhost:8000/.Once you are done with your tests, restore the original
gh-pages: