ssiyad's wiki



Hugo Section Tree

layouts/partials/sect.html

{{ if .File.Dir }}
    {{ if .IsPage }}
        <li>
            <a href="{{ .RelPermalink }}">{{ .Title }}</a>
        </li>
    {{ else }}
        <li>
            {{ .Title }}
        </li>
        <ul>
            {{ range .Pages.ByTitle }}
                {{ partial "tree.html" . }}
            {{ end}}
        </ul>
    {{ end }}
{{ end }}