Progress on archive page

This commit is contained in:
David Eisinger
2025-01-09 14:29:15 -05:00
parent daa935f44f
commit e7dc35cb20
3 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
{{ define "main" }}
<section>
{{ .Content }}
{{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }}
{{ $page := . }}
<h2>
{{ .Title }}
</h2>
<h3>
Posted {{ .Date | time.Format "2006-01-02" }}
</h3>
{{ $audioLink := printf "<a href=\"%s$1\">$3</a>" (substr .Site.BaseURL 0 -1) }}
{{ replaceRE `<audio controls src="((.*)/(.*).mp3)"></audio>` $audioLink .Content | safeHTML }}
<div style="page-break-after: always"></div>
{{ end }}
</section>
{{ end }}