aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs')
-rw-r--r--layouts/partials/docs/html-head.html4
-rw-r--r--layouts/partials/docs/menu-filetree.html12
2 files changed, 10 insertions, 6 deletions
diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html
index ee855f6..b22c610 100644
--- a/layouts/partials/docs/html-head.html
+++ b/layouts/partials/docs/html-head.html
@@ -4,6 +4,10 @@
<meta name="theme-color" content="#FFFFFF">
<meta name="color-scheme" content="light dark">
+{{- with .Page.Params.BookHref -}}
+ <meta http-equiv="Refresh" content="0; url='{{ . }}'" />
+{{- end -}}
+
{{- template "_internal/opengraph.html" . -}}
<title>{{ partial "docs/html-head-title" . }}</title>
diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html
index 8384f0f..edb150c 100644
--- a/layouts/partials/docs/menu-filetree.html
+++ b/layouts/partials/docs/menu-filetree.html
@@ -15,7 +15,7 @@
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
{{ template "book-section-children" (dict "Section" . "CurrentPage" $.CurrentPage) }}
</li>
- {{ else if and .IsPage }}
+ {{ else if and .IsPage .Content }}
<li>
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
</li>
@@ -28,19 +28,19 @@
{{ $current := eq .CurrentPage .Page }}
{{ $ancestor := .Page.IsAncestor .CurrentPage }}
- {{ if .Page.Params.bookCollapseSection }}
+ {{ if .Page.Params.BookCollapseSection }}
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
<label for="section-{{ md5 .Page }}" class="flex justify-between">
<a {{ if .Page.Content }}href="{{ .Page.RelPermalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
{{- partial "docs/title" .Page -}}
</a>
</label>
- {{ else if .Page.Content }}
- <a href="{{ .Page.RelPermalink }}" class="{{ if $current }} active{{ end }}">
+ {{ else if .Page.Params.BookHref }}
+ <a href="{{ .Page.Params.BookHref }}" class="{{ if $current }}active{{ end }}" target="_blank" rel="noopener">
{{- partial "docs/title" .Page -}}
</a>
- {{ else if .Page.Params.bookHref }}
- <a href="{{ .Page.Params.bookHref }}" role="button" class="{{ if $current }} active{{ end }}" target="_blank" rel="noopener">
+ {{ else if .Page.Content }}
+ <a href="{{ .Page.RelPermalink }}" class="{{ if $current }}active{{ end }}">
{{- partial "docs/title" .Page -}}
</a>
{{ else }}