trwnh.com/unified.test.hugo/layouts/partials/components/feed.html
2024-11-13 11:24:48 -06:00

18 lines
No EOL
841 B
HTML

{{- $ctx := .ctx }}
{{- $pages := or .pages $ctx.RegularPages }}
<main class="h-feed hfeed feed" id="main">
{{ "<!-- the main header contains list metadata -->" | safeHTML }}
{{ partial "components/feed-header.html" $ctx }}
{{- if and (eq $ctx.Section "tags") (eq $ctx.Kind "term") }}
{{- "<!-- list the pages labeled with this tag -->" | safeHTML }}
{{- $pages := slice }}
{{- $tagSet := slice $ctx.Name | append $ctx.Params.tag_aliases }}
{{- $pages = where $ctx.Site.RegularPages "Params.tags" "intersect" $tagSet }}
{{ partial "components/feed-entries-compact.html" $ctx.Pages }}
{{- else if eq $ctx.Section "series" }}
{{ $pages = sort $ctx.RegularPages "Params.series_part" "asc" }}
{{ partial "components/feed-entries-in-series.html" $pages }}
{{- else }}
{{ partial "components/feed-entries-compact.html" $pages }}
{{- end }}
</main>