MAke file_stat for local podcast files work if in subdir.
This commit is contained in:
parent
cfdcf5cac4
commit
d0d2798bc9
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@
|
|||
{{ end -}}
|
||||
<description>{{ .Content | html }}</description>
|
||||
{{ 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 }}
|
||||
{{ with .Params.podcast.mp3 }}{{ $file_stat := os.Stat (path.Join "/static" .) }}<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 }}{{ add site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" type="audio/mpeg" />{{ end }}
|
||||
{{ end -}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue