Documentation

This commit is contained in:
squidfunk 2024-05-15 17:35:32 +02:00
parent cc398ddc33
commit 3a27c8017e
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF

View File

@ -61,14 +61,13 @@ When the user chooses a version in the version selector, they usually want to go
to the page corresponding to the page they were previously viewing. Material for to the page corresponding to the page they were previously viewing. Material for
MkDocs implements this behavior by default, but there are a few caveats: MkDocs implements this behavior by default, but there are a few caveats:
- the [`site_url`] must be set correctly in `mkdocs.yml`. See the ["Publishing a - the [`site_url`][mkdocs.site_url] must be set correctly in `mkdocs.yml`.
new version"](#publishing-a-new-version) section for an example. See the ["Publishing a new version"](#publishing-a-new-version) section for
an example.
- you must be viewing the site at that URL (and not locally, for example). - you must be viewing the site at that URL (and not locally, for example).
- the redirect happens via JavaScript and there is no way to know which page you - the redirect happens via JavaScript and there is no way to know which page you
will be redirected to ahead of time. will be redirected to ahead of time.
[`site_url`]: https://www.mkdocs.org/user-guide/configuration/#site_url
### Version warning ### Version warning
<!-- md:version 8.0.0 --> <!-- md:version 8.0.0 -->
@ -131,6 +130,21 @@ redirected to.
[Version warning preview]: ../assets/screenshots/version-warning.png [Version warning preview]: ../assets/screenshots/version-warning.png
[default version]: #setting-a-default-version [default version]: #setting-a-default-version
### Version alias
<!-- md:version 9.5.23 -->
<!-- md:default `false` -->
If you're using aliases for versioning, and want to show the version alias
besides the version number, you can enable this feature by setting the `alias`
option to `true`:
``` yaml
extra:
version:
alias: true
```
## Usage ## Usage
While this section outlines the basic workflow for publishing new versions, While this section outlines the basic workflow for publishing new versions,