Files
davideisinger.com/themes/v2/layouts/archive/single.html
2025-02-05 22:59:58 -05:00

32 lines
921 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{ define "main" }}
{{ $sd := .Params.start_date }}
{{ $ed := .Params.end_date }}
<section class="page-break">
{{ time.Format "January 2006" $sd }} {{ time.Format "January 2006" $ed }}
</section>
{{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }}
{{ if lt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $sd) }}
{{ continue }}
{{ end }}
{{ if gt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $ed) }}
{{ continue }}
{{ end }}
<section class="page-break">
<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 }}
</section>
{{ end }}
{{ end }}