{{ define "main" }}
  <section>
    <hr>

    <h2>{{ .Title }}</h2>

    {{ .Content }}

    {{ range where .Site.RegularPages "Params.exclude_music" "!=" true }}
      {{ $page := . }}

      {{ range sort (.Resources.Match "*.mp3") "Title" "desc" }}
        <div class="music-track">
          <audio controls src="{{ .RelPermalink }}"></audio>

          <div>
            “{{ substr .Title 0 -4 }}”<br><a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a>
          </div>
        </div>
      {{ end }}
    {{ end }}
  </section>
{{ end }}
