Skip to content
Snippets Groups Projects
Commit 0dc2dd5a authored by alexisben's avatar alexisben
Browse files

add home toc

parent 67eb5cb0
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
{{ partial "home/hero.html" . }} {{ partial "home/hero.html" . }}
<div class="document-content"> <div class="document-content">
{{ partial "toc/container.html"
(dict
"toc" "toc/default.html"
"context" .
)
}}
{{- if .Params.blocks }} {{- if .Params.blocks }}
{{- partial "blocks/list.html" . -}} {{- partial "blocks/list.html" . -}}
......
{{- $show_aside := false -}}
{{- $has_blocks := false -}}
{{- range .context.Params.blocks -}}
{{- $has_blocks = true -}}
{{- if .title -}}
{{- $show_aside = true -}}
{{- end -}}
{{- end -}}
{{- if .context.Pages -}}
{{- if eq $has_blocks false -}}
{{- $show_aside = true -}}
{{- end -}}
{{- end -}}
{{- if .context.Content -}}
{{- if eq $has_blocks false -}}
{{- $show_aside = true -}}
{{- end -}}
{{- end -}}
{{- if .category -}}
{{- if eq $has_blocks false -}}
{{- $show_aside = true -}}
{{- end -}}
{{- end -}}
{{- if $show_aside }}
<nav class="toc toc-pages" id="nav-toc" aria-labelledby="toc-title">
<ol>
{{- if .context.Params.blocks -}}
{{- partial "blocks/toc.html" .context.Params.blocks -}}
{{- end -}}
</ol>
</nav>
{{ end -}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment