Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add latest alias for versioned URLs #462

Closed
wey-gu opened this issue May 19, 2021 · 1 comment
Closed

Add latest alias for versioned URLs #462

wey-gu opened this issue May 19, 2021 · 1 comment

Comments

@wey-gu
Copy link
Contributor

wey-gu commented May 19, 2021

We could consider adding an alias to the latest version of docs, this is helpful when we would like to refer some chapters(that's basically not changed among versions) always to its latest version.

This was triggered in discussion in this PR vesoft-inc/nebula#2476. cc @jamieliu1023 @yihong0618

It's feasible via https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/#publishing-a-new-version, which I quote as below:

Publishing a new version¶
If you want to publish a new version of your project documentation, choose a version identifier and update the alias set as the default version with:

mike deploy --push --update-aliases 0.1 latest

Note that every version will be deployed as a subdirectory of your site_url, e.g.:

  • docs.example.com/0.1/
  • docs.example.com/0.2/
  • ...
    Setting a default version¶
    When starting with mike, a good idea is to set an alias as a default version, e.g. latest, and when publishing a new version, always update the alias to point to the latest version:
mike set-default --push latest

Thanks.

@whitewum
Copy link
Contributor

Unfortunately, the structure of docs might change between versions. And it changes frequently as the product changes all the time. So I prefer not to jump to any sections by default (by now).

I've already set the latest stable version as default. And I might add a tag of latest later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants