Skip to content

Commit 3a27c80

Browse files
committed
Documentation
1 parent cc398dd commit 3a27c80

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

docs/setup/setting-up-versioning.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,13 @@ When the user chooses a version in the version selector, they usually want to go
6161
to the page corresponding to the page they were previously viewing. Material for
6262
MkDocs implements this behavior by default, but there are a few caveats:
6363

64-
- the [`site_url`] must be set correctly in `mkdocs.yml`. See the ["Publishing a
65-
new version"](#publishing-a-new-version) section for an example.
64+
- the [`site_url`][mkdocs.site_url] must be set correctly in `mkdocs.yml`.
65+
See the ["Publishing a new version"](#publishing-a-new-version) section for
66+
an example.
6667
- you must be viewing the site at that URL (and not locally, for example).
6768
- the redirect happens via JavaScript and there is no way to know which page you
6869
will be redirected to ahead of time.
6970

70-
[`site_url`]: https://www.mkdocs.org/user-guide/configuration/#site_url
71-
7271
### Version warning
7372

7473
<!-- md:version 8.0.0 -->
@@ -131,6 +130,21 @@ redirected to.
131130
[Version warning preview]: ../assets/screenshots/version-warning.png
132131
[default version]: #setting-a-default-version
133132

133+
### Version alias
134+
135+
<!-- md:version 9.5.23 -->
136+
<!-- md:default `false` -->
137+
138+
If you're using aliases for versioning, and want to show the version alias
139+
besides the version number, you can enable this feature by setting the `alias`
140+
option to `true`:
141+
142+
``` yaml
143+
extra:
144+
version:
145+
alias: true
146+
```
147+
134148
## Usage
135149

136150
While this section outlines the basic workflow for publishing new versions,

0 commit comments

Comments
 (0)