trwnh.com/unified.test.hugo/layouts/partials/components/feed.html

18 lines
841 B
HTML
Raw Normal View History

2024-11-13 17:24:48 +00:00
{{- $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>