docs/themes/geekboot/layouts/partials/auto-index.html

18 lines
483 B
HTML

{{/*
Auto-generates an index page with links to child pages, ordered by weight.
Usage: {{ partial "auto-index" . }}
*/}}
{{ if .RegularPages }}
<div class="auto-index">
{{ if .Params.description }}
<p>{{ .Params.description }}</p>
{{ end }}
<p>Topics in this section:</p>
<ul>
{{ range .RegularPages.ByWeight }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Params.description }} - {{ .Params.description }}{{ end }}</li>
{{ end }}
</ul>
</div>
{{ end }}