Skip to content

Commit

Permalink
website: upgrade mike to version 2.0
Browse files Browse the repository at this point in the history
https://github.com/jimporter/mike

The main immediate advantage of this is that `mike` will stop pushing empty
commits.

Also, we can consider switching to using symlinks instead of redirects for
mapping the "latest" version to "v0.11.0". This would make
`https://martinvonz.github.io/jj/latest/` have the same content as
`https://martinvonz.github.io/jj/v0.11.0/` (until the next version is out), but
the user would see `latest` in the URL.

For now, I set an option to keep using redirects.

I did a bit of non-exhaustive testing; it seems to work.
  • Loading branch information
ilyagr committed Nov 4, 2023
1 parent e701b08 commit 25b7476
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/scripts/docs-build-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ export "SITE_URL_FOR_MKDOCS=$1"; shift
# https://github.com/python-poetry/poetry/issues/1917
export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring
poetry install # Only really needed once per environment unless there are updates
poetry run -- mike deploy "$@"
# TODO(ilyagr): The new default "alias-type" is symlink, we should consider
# switching to it.
poetry run -- mike deploy --alias-type redirect "$@"
51 changes: 43 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mdx-breakless-lists = "^1.0.1"
# Allows setting up redirects when renaming docs files
mkdocs-redirects = "^1.2.1"
# Versioning of documentation
mike = "^1.1.2"
mike = "^2.0.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit 25b7476

Please sign in to comment.