Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Switch to version-relative URLs (#15978)
* docs: Switch to version-relative URLs Implements /docs/head and /docs/latest as ways to load the docs from the HEAD branch and from the latest release. * Update Makefile.js * Update docs/src/_includes/components/nav-version-switcher.html Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/src/_includes/components/version-switcher.html Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update docs/src/_includes/partials/versions-list.html Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
- Loading branch information
1 parent
71bc750
commit df7768e
Showing
5 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<ul class="versions-list"> | ||
<li><a href="/docs/head/" {% if GIT_BRANCH != "latest" %} data-current="true" {% endif %}>HEAD</a></li> | ||
<li><a href="/docs/latest/" {% if GIT_BRANCH == "latest" %} data-current="true" {% endif %}>v{{ eslintVersion }}</a></li> | ||
{%- for version in versions.items -%} | ||
<li><a href="{{ version.url }}" {% if config.version == version.number %} data-current="true" {% endif %}>v{{ version.number }}</a></li> | ||
<li><a href="{{ version.url }}">v{{ version.number }}</a></li> | ||
{%- endfor -%} | ||
</ul> |