Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/check-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ source ./hack/lib/common.sh
header_text "Building the site and checking links"
docker volume create sdk-html
docker run --rm -v "$(pwd):/src" -v sdk-html:/target klakegg/hugo:0.70.0-ext-ubuntu -s website
docker run --rm -v sdk-html:/target mtlynch/htmlproofer /target --empty-alt-ignore --http-status-ignore 429
docker run --rm -v sdk-html:/target mtlynch/htmlproofer /target --empty-alt-ignore --http-status-ignore 429 --allow_hash_href
docker volume rm sdk-html
13 changes: 10 additions & 3 deletions website/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,19 @@ github_repo = "https://github.com/operator-framework/operator-sdk"

[[params.versions]]
version = "master"
url = "/docs"
url = "https://master.sdk.operatorframework.io"

[[params.versions]]
version = "v0.16"
url = "https://github.com/operator-framework/operator-sdk/tree/v0.16.x/doc"
version = "Latest Release"
url = "https://sdk.operatorframework.io"

[[params.versions]]
version = "v0.18"
url = "https://v0-18-x.sdk.operatorframework.io"

[[params.versions]]
version = "v0.17"
url = "https://github.com/operator-framework/operator-sdk/tree/v0.17.x/doc"

# Specify a value here if your content directory is not in your repo's root directory
github_subdir = "website"
Expand Down
8 changes: 8 additions & 0 deletions website/layouts/partials/navbar-version-selector.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<a class="of-link-list__a 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 }}
<a class="dropdown-item" href="{{ .url }}">{{ .version }}</a>
{{ end }}
</div>
20 changes: 12 additions & 8 deletions website/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
<a href="/" class="of-brand">
<picture class="of-brand__picture">
<source srcset="/build/images/logo.svg" media="(min-width: 992px)">
<img src="/build/images/logo-sm.svg" alt="">
</picture>
<img src="/build/images/logo-sm.svg" alt="">
</picture>
</a>
<nav class="of-nav-main nav-collapse">
<ul class="of-nav-main__items menu-items">
<li class="of-nav-main__item"><a class="of-link-list__a {{ if eq .URL "/" }} of-m-active {{end}}" href="/">Home</a></li>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="of-nav-main__item"><a class="of-link-list__a{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} of-m-active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ range .Site.Menus.main }}
<li class="of-nav-main__item"><a class="of-link-list__a{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} of-m-active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a></li>
{{ end }}
{{ if .Site.Params.versions }}
<li class="of-nav-main__item">
{{ partial "navbar-version-selector.html" . }}
</li>
{{ end }}
</ul>
</nav>

<div class="of-header-main__search">
{{ partial "search-input.html" . }}
</div>
</header>
</header>