aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/nav-filetree.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs/nav-filetree.html')
-rw-r--r--layouts/partials/docs/nav-filetree.html47
1 files changed, 0 insertions, 47 deletions
diff --git a/layouts/partials/docs/nav-filetree.html b/layouts/partials/docs/nav-filetree.html
deleted file mode 100644
index 3ec4539..0000000
--- a/layouts/partials/docs/nav-filetree.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!-- Put configured sections list to .Scratch -->
-{{ template "book-get-root-section" . }}
-
-{{- range .Scratch.Get "BookSections" -}}
- {{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }}
-{{- end -}}
-
-{{ define "book-section" }} <!-- Single section of menu (recursive) -->
- <ul>
- {{ range .Section.Sections }}
- <li {{- if .Params.bookrootsection}} class="root-section" {{ end }}>
- {{- if .Content -}}
- {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
- {{- else -}}
- {{- template "title" . -}}
- {{- end -}}
-
- {{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }}
- </li>
- {{ end }}
-
- {{ range .Section.Pages }}
- <li>
- {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
- </li>
- {{ end }}
- </ul>
-{{ end }}
-
-{{ define "book-page-link" }}
-{{- with .Page -}}
-<a href="{{ .RelPermalink }}" {{- if eq $.CurrentPage .Permalink }} class="active"{{ end }}>
- {{- template "title" . -}}
-</a>
-{{- end -}}
-{{ end }}
-
-{{ define "book-get-root-section" }}
-<!-- Complex logic to guess page title without .Title specified -->
- {{ $bookSection := default "docs" .Site.Params.BookSection }}
- {{ if eq $bookSection "*" }}
- {{ .Scratch.Set "BookSections" .Site.Sections }}
- {{ else }}
- {{ $bookSections := where .Site.Sections "Section" $bookSection }}
- {{ .Scratch.Set "BookSections" $bookSections }}
- {{ end }}
-{{ end }} \ No newline at end of file