Bug fix, path.Join do not work with full scheme URLs. Fix in feed earlier, this is for the partial.

This commit is contained in:
Fredrik Jonsson 2023-07-25 08:50:45 +02:00
commit dab1fb45da

View file

@ -1,6 +1,6 @@
{{ $src := (.Params.podcast.mp3 | absURL) -}}
{{ if site.Params.Podcast.cdn -}}
{{ $src = path.Join site.Params.Podcast.cdn (.Params.podcast.mp3 | relURL) -}}
{{ $src = add site.Params.Podcast.cdn (.Params.podcast.mp3 | relURL) -}}
{{ end -}}
<figure class="podcast">
<audio controls preload="{{ site.Params.Podcast.preload | default "metadata" }}"><source src="{{ $src }}" type="audio/mpeg"></audio>