Initial version
This commit is contained in:
commit
ed5653a7fc
211 changed files with 11043 additions and 0 deletions
10
themes/zen/layouts/podcast/full.html
Normal file
10
themes/zen/layouts/podcast/full.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<article class="full-view{{ with .Section }} full-view--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
|
||||
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
|
||||
</header>
|
||||
|
||||
{{ partial "podcast.html" . -}}
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
64
themes/zen/layouts/podcast/rss.xml
Normal file
64
themes/zen/layouts/podcast/rss.xml
Normal file
|
@ -0,0 +1,64 @@
|
|||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||
<channel>
|
||||
<title>{{ site.Params.Podcast.Title | default site.Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>{{ site.Params.Podcast.Description | default site.Params.Description }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>{{ site.Params.Podcast.Lang | default site.LanguageCode }}</language>
|
||||
{{ with site.Params.author.email -}}
|
||||
<managingEditor>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>
|
||||
{{ end -}}
|
||||
{{ with site.Params.author.email -}}
|
||||
<webMaster>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</webMaster>
|
||||
{{ end -}}
|
||||
{{ with site.Copyright -}}
|
||||
<copyright>{{ . }}</copyright>
|
||||
{{ end -}}
|
||||
{{ if not .Date.IsZero -}}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
|
||||
{{ end -}}
|
||||
{{ with site.Params.Podcast.Image }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
|
||||
{{ with site.Params.Podcast.Category -}}
|
||||
<itunes:category {{ if .name }}text="{{ .name }}"{{ end }}>
|
||||
{{ range .subcategories }}<itunes:category text="{{ . }}" />{{ end }}
|
||||
</itunes:category>
|
||||
{{ end -}}
|
||||
{{ with site.Params.Podcast.Owner -}}
|
||||
<itunes:owner>
|
||||
{{ with .name }}<itunes:name>{{ . }}</itunes:name>{{ end }}
|
||||
{{ with .email }}<itunes:email>{{ . }}</itunes:email>{{ end }}
|
||||
</itunes:owner>
|
||||
{{ end -}}
|
||||
{{ with site.Params.Podcast.Description }}<itunes:summary>{{ . }}</itunes:summary>{{ end }}
|
||||
{{ with site.Params.Podcast.Author }}<itunes:author>{{ . }}</itunes:author>{{ end }}
|
||||
{{ with site.Params.Podcast.Type }}<itunes:type>{{ . }}</itunes:type>{{ end }}
|
||||
{{ with site.Params.Podcast.Block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
|
||||
{{ with site.Params.Podcast.Complete }}<itunes:complete>{{ . }}</itunes:complete>{{ end }}
|
||||
{{ with site.Params.Podcast.NewFeed }}<itunes:new-feed-url>{{ . }}</itunes:new-feed-url>{{ end }}
|
||||
<itunes:explicit>{{ if site.Params.Podcast.Explicit }}true{{ else }}false{{ end }}</itunes:explicit>
|
||||
{{ range .Pages -}}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<itunes:title>{{ .Title }}</itunes:title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with site.Params.Podcast.Author }}<author>{{ . }}</author>{{ end }}
|
||||
<description>{{ .Content | html }}</description>
|
||||
{{ if site.Params.Podcast.local | default true -}}
|
||||
{{ 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 -}}
|
||||
{{ with .Params.podcast.duration }}<itunes:duration>{{ . }}</itunes:duration>{{ end }}
|
||||
{{ with .Params.podcast.image.src }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
|
||||
{{ with .Params.podcast.episode }}<itunes:episode>{{ . }}</itunes:episode>{{ end }}
|
||||
{{ with .Params.podcast.episodeType }}<itunes:episodeType>{{ . }}</itunes:episodeType>{{ end }}
|
||||
{{ with .Params.podcast.season }}<itunes:season>{{ . }}</itunes:season>{{ end }}
|
||||
{{ with .Params.podcast.block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
|
||||
<itunes:explicit>{{ if .Params.podcast.explicit }}true{{ else }}false{{ end }}</itunes:explicit>
|
||||
</item>
|
||||
{{ end -}}
|
||||
</channel>
|
||||
</rss>
|
15
themes/zen/layouts/podcast/single.html
Normal file
15
themes/zen/layouts/podcast/single.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ define "main" -}}
|
||||
<main class="main layout__main">
|
||||
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}">{{ .Title }}</h1>
|
||||
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
|
||||
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
|
||||
</header>
|
||||
|
||||
{{ partial "podcast.html" . -}}
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</main>
|
||||
{{ end -}}
|
Loading…
Add table
Add a link
Reference in a new issue