adds related articles

This commit is contained in:
Drew
2025-03-31 11:43:25 -06:00
parent 46c0a96540
commit 90994d0099
4 changed files with 57 additions and 9 deletions

View File

@ -1,16 +1,20 @@
{{ $pages := .Pages }}
{{ range $pages }}
{{- $page := . -}}
{{- if reflect.IsMap . -}}
{{- $page = .page -}}
{{- end -}}
<li class="flex gap-4 items-center">
<a class="flex-grow" href="{{ .RelPermalink }}">{{ partial "article-wompum.html" . }}</a>
<time class="text-gray-800 font-iosevka" datetime="{{ .Date.Format "2006-01-02" }}">
<p>{{ .Date.Format "Jan" }}</p>
<p>{{ .Date.Format "02" }}</p>
<p>{{ .Date.Format "2006" }}</p>
<a class="flex-grow" href="{{ $page.RelPermalink }}">{{ partial "article-wompum.html" $page }}</a>
<time class="text-gray-800 font-iosevka" datetime="{{ $page.Date.Format "2006-01-02" }}">
<p>{{ $page.Date.Format "Jan" }}</p>
<p>{{ $page.Date.Format "02" }}</p>
<p>{{ $page.Date.Format "2006" }}</p>
</time>
<div class="flex-shrink-0 max-w-max">
<a class="text-2xl font-bold hover:text-green-900 underline" href="{{ .RelPermalink }}">{{ .Params.narrator }}: {{ .Params.subject }}</a>
<p class="max-w-prose">{{ .Params.summary }}</p>
{{ partial "tags.html" .}}
<a class="text-2xl font-bold hover:text-green-900 underline" href="{{ $page.RelPermalink }}">{{ partial "article-title" $page }}</a>
<p class="max-w-prose">{{ $page.Params.summary }}</p>
{{ partial "tags.html" $page }}
</div>
</li>
{{ end }}