Skip to content

Commit 3fb24d0

Browse files
authored
Merge pull request #30 from anik120/releases
Add versioned documents
2 parents c9ad7d3 + e53a8a8 commit 3fb24d0

File tree

3 files changed

+66
-21
lines changed

3 files changed

+66
-21
lines changed

config.toml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,40 @@ copyright = "The Operator Lifecycle Manager Authors"
7070

7171
# Menu title if your navbar has a versions selector to access old versions of your site.
7272
# This menu appears only if you have at least one [params.versions] set.
73-
# version_menu = "Releases"
74-
# [[params.versions]]
75-
# version = "master"
76-
# url = "/docs"
73+
version_menu = "Releases"
7774

78-
# [[params.versions]]
79-
# version = "v0.16"
80-
# url = "https://github.com/operator-framework/operator-sdk/tree/v0.16.x/doc"
75+
# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
76+
github_repo = "https://github.com/operator-framework/olm-docs"
77+
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
78+
github_project_repo = "https://github.com/operator-framework/operator-lifecycle-manager"
79+
80+
# Specify a value here if your content directory is not in your repo's root directory
81+
# github_subdir = ""
82+
83+
# Google Custom Search Engine ID. Remove or comment out to disable search.
84+
gcs_engine_id = "011737558837375720776:fsdu1nryfng"
85+
86+
# Enable Algolia DocSearch
87+
algolia_docsearch = false
88+
89+
# version configuration
90+
91+
[[params.versions]]
92+
version = "master"
93+
url = "https://olm.operatorframework.io"
94+
primary = true
95+
96+
[[params.versions]]
97+
version = "v0.15.z"
98+
url = "https://v0-15-x.olm.operatorframework.io/"
99+
100+
[[params.versions]]
101+
version = "v0.14.z"
102+
url = "https://v0-14-x.olm.operatorframework.io/"
103+
104+
[[params.versions]]
105+
version = "v0.13.z"
106+
url = "https://v0-13-x.olm.operatorframework.io/"
81107

82108
# Flag used in the "version-banner" partial to decide whether to display a
83109
# banner on every page indicating that this is an archived version of the docs.
@@ -93,20 +119,6 @@ copyright = "The Operator Lifecycle Manager Authors"
93119
# point people to the main doc site.
94120
# url_latest_version = "https://example.com"
95121

96-
# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
97-
github_repo = "https://github.com/operator-framework/olm-docs"
98-
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
99-
github_project_repo = "https://github.com/operator-framework/operator-lifecycle-manager"
100-
101-
# Specify a value here if your content directory is not in your repo's root directory
102-
# github_subdir = ""
103-
104-
# Google Custom Search Engine ID. Remove or comment out to disable search.
105-
gcs_engine_id = "011737558837375720776:fsdu1nryfng"
106-
107-
# Enable Algolia DocSearch
108-
algolia_docsearch = false
109-
110122
# User interface configuration
111123
[params.ui]
112124
# Enable to show the side bar menu in its compact state.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<a class="of-link-list__a nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2+
{{ .Site.Params.version_menu }}
3+
</a>
4+
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
5+
{{ range .Site.Params.versions }}
6+
<a class="dropdown-item" href="{{ .url }}">{{ .version }}</a>
7+
{{ end }}
8+
</div>

layouts/partials/navbar.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<header class="of-header-main">
2+
<a href="/" class="of-brand">
3+
<picture class="of-brand__picture">
4+
<source srcset="/images/logo.svg" media="(min-width: 992px)">
5+
<img src="/images/logo-sm.svg" alt="">
6+
</picture>
7+
</a>
8+
<nav class="of-nav-main nav-collapse">
9+
<ul class="of-nav-main__items menu-items">
10+
<li class="of-nav-main__item"><a class="of-link-list__a {{ if eq .URL "/" }} of-m-active {{end}}" href="/">Home</a></li>
11+
{{ $currentPage := . }}
12+
{{ range .Site.Menus.main }}
13+
<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>
14+
{{ end }}
15+
{{ if .Site.Params.versions }}
16+
<li class="of-nav-main__item">
17+
{{ partial "navbar-version-selector.html" . }}
18+
</li>
19+
{{ end }}
20+
</ul>
21+
</nav>
22+
<div class="of-header-main__search">
23+
{{ partial "search-input.html" . }}
24+
</div>
25+
</header>

0 commit comments

Comments
 (0)