diff --git a/config.toml b/config.toml index c3a6e316..19b64dd6 100644 --- a/config.toml +++ b/config.toml @@ -220,6 +220,7 @@ date = ["date", "publishDate", "lastmod", ":git"] name = 'rss' [outputFormats.podcast] baseName = 'podcast' + name = 'Podcast' mediaType = 'application/rss+xml' isHTML = false [outputFormats.gemini] diff --git a/layouts/_default/list.podcast.xml b/layouts/_default/list.podcast.xml index e4d97360..3921b960 100644 --- a/layouts/_default/list.podcast.xml +++ b/layouts/_default/list.podcast.xml @@ -6,15 +6,17 @@ {{- end -}} {{- printf "" | safeHTML }} {{- printf "" | safeHTML }} - + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink | absURL }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Narrations of recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Params.Author.email }} {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.Author.email }} - {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with $.Site.Params.Author.name }} + {{.}}{{ end }} + {{ "profile-512.jpg" | absURL }}{{ with .Site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- range $i, $page := $pages -}} @@ -26,6 +28,7 @@ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ .Permalink | absURL }} {{- partial "description.txt" . -}} + {{- partial "feedpost.html" . | html -}} {{- partial "feedpost.html" . | html -}} {{- range .Params.syndications}} {{ . }} diff --git a/layouts/partials/alternatename.txt b/layouts/partials/alternatename.txt index fe1d6fef..371c6d64 100644 --- a/layouts/partials/alternatename.txt +++ b/layouts/partials/alternatename.txt @@ -2,5 +2,6 @@ {{- else if eq . "rss"}}RSS {{- else if eq . "opml" }}OPML Feed {{- else if eq . "gemini" }}Gemini +{{- else if eq . "podcast" }}Audiocast {{- else }}Alternate {{- end -}} diff --git a/layouts/partials/description.txt b/layouts/partials/description.txt index 8effcbe2..6be2d25d 100644 --- a/layouts/partials/description.txt +++ b/layouts/partials/description.txt @@ -1,9 +1,14 @@ -{{- if .Params.bookmarkOf -}} - {{- $reference := partial "reference.obj" (dict "url" .Params.bookmarkOf "page" .) -}} - Thoughts on a bookmarked article{{ with $reference.name }}: {{.}}{{ end }}. +{{- if or (strings.Contains .Summary "\n") (eq (len .Summary) 0) -}} + {{- if .Params.bookmarkOf -}} + {{- $reference := partial "reference.obj" (dict "url" .Params.bookmarkOf "page" .) -}} + Thoughts on a bookmarked article{{ with $reference.name }}: {{.}}{{ end }}. + {{- else -}} + {{- if eq .Section "calendar" -}}(An event I may be going to.) {{ end -}} + {{- $desc := (index (split .Summary "\n") 0) | plainify | safeHTML -}} + {{- $desc -}} + {{- range .Params.tags }} #{{.}}{{ end -}} + {{- end -}} {{- else -}} - {{- if eq .Section "calendar" -}}(An event I may be going to.) {{ end -}} - {{- $desc := (index (split .Summary "\n") 0) | plainify | safeHTML -}} - {{- $desc -}} + {{- .Summary -}} {{- range .Params.tags }} #{{.}}{{ end -}} {{- end -}} \ No newline at end of file diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 4bbeb68e..957a1a93 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -152,10 +152,8 @@ {{- else if (eq .name "pixelfed") -}} -{{- else if (eq .name "podcasts-apple") -}} - -{{- else if (eq .name "podcasts-google") -}} - +{{- else if (eq .name "podcast") -}} + {{- else if (eq .name "polywork") -}} {{- else if (eq .name "reddit") -}} diff --git a/layouts/shortcodes/social.html b/layouts/shortcodes/social.html new file mode 100644 index 00000000..7d00c9d9 --- /dev/null +++ b/layouts/shortcodes/social.html @@ -0,0 +1,13 @@ +{{- $medium := .Get 0 -}} +{{- $details := dict -}} +{{- range site.Params.social -}} + {{- if eq .name $medium -}} + {{- $details = . -}} + {{- break -}} + {{- end -}} +{{- end -}} +{{- with $details -}} + {{ .name }} +{{- else -}} + {{ errorf "Unknown social: %s" $medium }} +{{- end -}} \ No newline at end of file diff --git a/static/rss.xsl b/static/rss.xsl index 20695149..9241609c 100644 --- a/static/rss.xsl +++ b/static/rss.xsl @@ -2,9 +2,15 @@ + + + Podcast + RSS feed + + - <xsl:value-of select="/rss/channel/title"/> RSS Feed + <xsl:value-of select="/rss/channel/title"/>: <xsl:value-of select="$pageTitle"/> @@ -66,7 +72,7 @@
-

RSS Feed

+