aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs
diff options
context:
space:
mode:
authorHorea Christian <horea.christ@yandex.com>2022-04-26 07:10:39 -0400
committerGitHub <noreply@github.com>2022-04-26 13:10:39 +0200
commitc2014a08a534ef6b55505e719a68ccce88cb3cdb (patch)
tree72ec864cb1534f35739fb23cd355870b8e3ecf23 /layouts/partials/docs
parentfaede5e7496c5d5d52ce7458e093c4e8121cca6e (diff)
Add BookHref, set explicit URL for the menu (#440)
Diffstat (limited to 'layouts/partials/docs')
-rw-r--r--layouts/partials/docs/menu-filetree.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html
index dd61af7..8384f0f 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 .Content }}
+ {{ else if and .IsPage }}
<li>
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
</li>
@@ -39,6 +39,10 @@
<a href="{{ .Page.RelPermalink }}" class="{{ if $current }} active{{ end }}">
{{- 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">
+ {{- partial "docs/title" .Page -}}
+ </a>
{{ else }}
<span>{{- partial "docs/title" .Page -}}</span>
{{ end }}