Improved documentation versioning (#3569)
* add navbar-version-selector.html * update site/build_docs.py * update site/build_docs.py * update _index.html and fix mistakes in config.toml * fix _index.html * replace all tabs with spaces * update navbar-version-selector.html * fix link in the site/readme.md * replace tabs with spaces in custom.scss and 404.html * fix linter errorsmain
parent
3800a91e03
commit
35f5be2632
@ -0,0 +1,11 @@
|
|||||||
|
{{ $page_rel := .Page.RelPermalink | safeURL }}
|
||||||
|
{{ $page_rel_trim := strings.TrimLeft "/" $page_rel | safeURL }}
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{ .Site.Params.version_menu }}
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||||
|
{{ range .Site.Params.versions }}
|
||||||
|
{{ $ver := .version }}
|
||||||
|
<a class="dropdown-item" href="{{ .url }}{{ if eq $ver "develop" }}{{ $page_rel_trim }}{{ else }}{{ $page_rel }}{{ end }}">{{ $ver }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
Loading…
Reference in New Issue