Bug fix, path.Join do not work with full scheme URLs. Made podcast feed with cdn not work. Revert back to use add.
This commit is contained in:
parent
8432f13929
commit
363850bae8
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@
|
|||
{{ if site.Params.Podcast.local | default true -}}
|
||||
{{ with .Params.podcast.mp3 }}{{ $file_stat := os.Stat (path.Join "/static" (. | relURL)) }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ path.Join site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" length="{{ $file_stat.Size }}" type="audio/mpeg" />{{ end }}
|
||||
{{ else -}}
|
||||
{{ with .Params.podcast.mp3 }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ path.Join site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" type="audio/mpeg" />{{ end }}
|
||||
{{ with .Params.podcast.mp3 }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ add site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" type="audio/mpeg" />{{ end }}
|
||||
{{ end -}}
|
||||
{{ with .Params.podcast.duration }}<itunes:duration>{{ . }}</itunes:duration>{{ end }}
|
||||
{{ with .Params.podcast.image.src }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue