Add music page

This commit is contained in:
David Eisinger
2023-10-29 22:58:10 -04:00
parent 016eb90a79
commit 33e0a08130
3 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
{{ define "main" }}
<section>
<hr>
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ range where .Site.RegularPages "Params.exclude_music" "!=" true }}
{{ $page := . }}
{{ range sort (.Resources.Match "*.mp3") "Title" "desc" }}
<p>
<audio controls src="{{ .RelPermalink }}"></audio><br>
“{{ substr .Title 0 -4 }}” <a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a>
</p>
{{ end }}
{{ end }}
</section>
{{ end }}