aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/menu-filetree.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs/menu-filetree.html')
-rw-r--r--layouts/partials/docs/menu-filetree.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html
index abc6fd9..c8dd86b 100644
--- a/layouts/partials/docs/menu-filetree.html
+++ b/layouts/partials/docs/menu-filetree.html
@@ -38,13 +38,14 @@
{{ define "book-section-children" }}
{{ with .Section }}
<ul>
- {{ range where .Sections "Params.bookhidden" "!=" true }}
- {{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }}
- {{ end }}
- {{ range where .Pages "Params.bookhidden" "!=" true }}
- <li>
- {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
- </li>
+ {{ range where .Pages "Params.bookhidden" "!=" "true" }}
+ {{ if eq .Kind "section" }}
+ {{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }}
+ {{ else if and (eq .Kind "page") .Content }}
+ <li>
+ {{- template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) -}}
+ </li>
+ {{ end }}
{{ end }}
</ul>
{{ end }}