Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed .0 from doc version drop down #414

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion layouts/partials/docs/menu.html
Expand Up @@ -2,11 +2,14 @@
{{ $thisPage := .RelPermalink }}
{{ $docsSections := where site.Sections "Section" "docs" }}
{{ $version := index (split .File.Path "/") 1 }}
{{ $versionNumbers := split $version "." }}
{{ $majorVersion := index $versionNumbers 0 }}
{{ $minorVersion := index $versionNumbers 1 }}

<aside class="menu">
<p class="menu-label">
<a href="/docs/{{ $version }}">
Harbor version {{ $version }}
Harbor version {{ $majorVersion }}.{{ $minorVersion }}
</a>
</p>

Expand Down
5 changes: 4 additions & 1 deletion layouts/partials/navbar.html
Expand Up @@ -68,13 +68,16 @@

<div class="navbar-dropdown is-right">
{{ range site.Params.versions }}
{{ $version := split .harborversion "." }}
{{ $majorVersion := index $version 0 }}
{{ $minorVersion := index $version 1 }}
{{ $isLatest := eq . $latest }}
<div class="navbar-item">
<div class="columns">
<div class="column">
<a class="has-text-black" href="/docs/{{ .harborversion }}" data-proofer-ignore>
<span>
{{ .harborversion }}
{{ printf "%s.%s" $majorVersion $minorVersion }}
</span>
&nbsp;&nbsp;
{{ if $isLatest }}
Expand Down