yequari.com/layouts/notes/list.html

27 lines
902 B
HTML
Raw Normal View History

{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
<section class="content posts h-feed hfeed notes-list">
{{ $taxonomy := "tags" }}
{{ $section := "notes" }}
{{ range $term, $weightedPages := index site.Taxonomies $taxonomy }}
{{ $termPage := site.GetPage (printf "%s/%s" $taxonomy $term) }}
{{ $termPages := where $weightedPages "Page.Section" $section }}
{{ $amount := $termPages.Len }}
{{ if gt $amount 0 }}
<section class="notes-tag">
<h2>{{ $termPage.LinkTitle }}</h2>
<ul>
{{ range sort $termPages "Page.Title" }}
<li>
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
</li>
{{ end }}
</ul>
</section>
{{ end }}
{{ end }}
</section>
{{ end }}