initial
This commit is contained in:
commit
4f148ac9c1
38 changed files with 1603 additions and 0 deletions
90
archetypes/episode.md
Normal file
90
archetypes/episode.md
Normal file
|
@ -0,0 +1,90 @@
|
|||
---
|
||||
title: '{{ replace .File.ContentBaseName "-" " " | title }}' # podcast field: itunes:title ; title of the episode
|
||||
description: "" # podcast field: description
|
||||
date: {{ .Date }} # podcast field: pubDate
|
||||
outputs:
|
||||
- html
|
||||
- chapters
|
||||
- chapterspodlove
|
||||
- transcriptsrt
|
||||
- transcriptwebvtt
|
||||
- transcripthtml
|
||||
- transcriptjson
|
||||
- transcriptpodlove
|
||||
type: episode
|
||||
params:
|
||||
enclosure:
|
||||
resource_file: "" # name of the resource in the episode directory
|
||||
external_url: "" # absolute external URL if the audio file is hosted somewhere else
|
||||
length: 0 # byte length of the episode
|
||||
type: "" # mime type of the enclosed file
|
||||
alternate_enclosures:
|
||||
- sources: # one of resource_file or external_url per item
|
||||
- resource_file: "" # name of the resource in the episode directory
|
||||
external_url: "" # URL to download that enclosure
|
||||
type: "" # content type
|
||||
sri_hash: "" # SRI hash of the file to download
|
||||
type: "" # MIME type of that enclosure
|
||||
length: 0 # optional/recommended; byte length of the file to download
|
||||
bitrate: 0 # optional; bitrate of the file, expressed as bits per second
|
||||
lang: fr # optional; language tag from IETF BCP 47
|
||||
title: "" # optional; title of the asset; max 32 chars
|
||||
codecs: "" # optional; codec string as in RFC 6381
|
||||
guid: "" # podcast field: guid
|
||||
# duration: 0 # podcast field: itunes:duration ; expressed in seconds
|
||||
# image: "" # podcast field: itunes:image ; image for the episode
|
||||
# explicit: false # podcast field: itunes:explicit
|
||||
# episode_number: 0 # podcast field: itunes:episode ; the number of the episode in the series/season
|
||||
# season: # podcast field: itunes:season
|
||||
# number: 0 # the number of the season
|
||||
# title: ""
|
||||
# episode_type: "" # podcast field: itunes:episodeType ; one of "Full", "Trailer" or "Bonus"
|
||||
# transcript: # podcast field: podcast:transcript
|
||||
# - content: "" # YAML file containing the transcript
|
||||
# external_content: # url of the remote content to use as is in different format
|
||||
# srt: ""
|
||||
# webvtt: ""
|
||||
# html: ""
|
||||
# json: ""
|
||||
# language: fr # optional; if omitted, language is the same as the podcast language attribute
|
||||
# rel: "captions" # ; optional ; only valid value is "captions"; indicates that this transcript contains time codes
|
||||
# funding: # podcast field: podcast:funding
|
||||
# - url: ""
|
||||
# - comment: ""
|
||||
# chapters: # podcast field: podcast:chapters
|
||||
# - start_time: 0.0
|
||||
# title: ""
|
||||
# toc: true # this field needs to be defined and set to true if that chapter must be present in the table of content
|
||||
# image: ""
|
||||
# url: ""
|
||||
# end_time: 0.0
|
||||
# location:
|
||||
# name: ""
|
||||
# geo: ""
|
||||
# soundbites: # podcast field: podcast:soundbite
|
||||
# - start_time: 0.0 # expressed in seconds since the start of the episode
|
||||
# duration: 0.0
|
||||
# title: ""
|
||||
# persons: # podcast field: podcast:person ; description and links to a podcast participant
|
||||
# - name: Florian Maury
|
||||
# href: https://infosec.exchange/@x_cli
|
||||
# img: "" # url to avatar
|
||||
# group: Cast # as listed in https://github.com/Podcastindex-org/podcast-namespace/blob/main/taxonomy.json
|
||||
# role: Host
|
||||
# location: # podcast field: podcast:location ; used to associate the podcast or the episode to a specific location
|
||||
# freeform: "" # Description of the place (128 chars max)
|
||||
# geo: "" # lattitude and longitude expressed in "geo" notation
|
||||
# osm: "" # Open Street Map Identifier
|
||||
# episode: 0 # podcast field: podcast:episode ; number of the episode in the season ; ignored if season is 0
|
||||
# licence:
|
||||
# name: CC-BY 4.0
|
||||
# url: https://creativecommons.org/licenses/by/4.0/
|
||||
# social_interacts: # podcast field: podcast:socialInteracts ; links to interact on social media with the podcast
|
||||
# - protocol: activitypub # one of https://github.com/Podcastindex-org/podcast-namespace/blob/main/socialprotocols.txt
|
||||
# uri: "" # URL of the root post for the channel as a whole
|
||||
# priority: 10
|
||||
# recommendations: # poodcast field: podcast:recommandations
|
||||
# - url: https://pod.broken-by-design.fr/recommendations.fr.json
|
||||
# language: fr
|
||||
# comment: Recommandations générales
|
||||
---
|
83
archetypes/podcast.md
Normal file
83
archetypes/podcast.md
Normal file
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
title: "" # podcast field: title
|
||||
description: "" # podcast field: description
|
||||
draft: false
|
||||
date: "2024-10-11T00:00:01Z"
|
||||
type: podcast
|
||||
outputs:
|
||||
# - html
|
||||
- rss
|
||||
params:
|
||||
guid: "" # podcast field: podcast:guid
|
||||
lang: "" # podcast field: language ; from ISO 639
|
||||
# platforms:
|
||||
# - name: apple # one of https://github.com/Podcastindex-org/podcast-namespace/blob/main/serviceslugs.txt
|
||||
# url: "" # URL the podcast on that platform
|
||||
image: # podcast field: itunes:image ; URL to an image representing the podcast
|
||||
resource_file: ""
|
||||
external_url: ""
|
||||
# images: # podcast field: podcast:images ; multiple images with various width
|
||||
# - resource_file: "" # name of the resource in the podcast directory
|
||||
# external_url: "" # absolute external URL to the image hosted elsewhere
|
||||
# width: 0 # width of the image
|
||||
category: "" # podcast field: itunes:category ; one of https://github.com/Podcastindex-org/podcast-namespace/blob/main/categories.json
|
||||
explicit: false # podcast field: itunes:explicit
|
||||
email: "" # used in podcast:locked and itunes:owner => itunes:email
|
||||
medium: podcast # podcast field: podcast:medium ; one of https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#medium
|
||||
website_link: "" # podcast field: link ; a link to the podcast website
|
||||
podcast_type: episodic # podcast field: itunes:type ; either episodic or serial
|
||||
# copyright: "" # podcast field: copyright
|
||||
# licence: # podcast field: podcast:licence
|
||||
# name: CC-BY 4.0
|
||||
# url: https://creativecommons.org/licenses/by/4.0/
|
||||
locked: true # podcast field: podcast:locked; control whether the podcast can be imported by platforms
|
||||
use_op3: true # Whether to use op3 redirection for gathering statistics
|
||||
# funding: # podcast field: podcast:funding
|
||||
# - url: "bli" # URL to the funding method
|
||||
# comment: "bla" # name of the funding method or message to encourage funding; limited to 128 chars
|
||||
# recommendations: # podcast field: podcast:recommendations
|
||||
# - url: https://pod.broken-by-design.fr/recommendations.fr.json
|
||||
# language: fr
|
||||
# location: # podcast field: podcast:location ; used to associate the podcast or the episode to a specific location
|
||||
# description: "" # Description of the place (128 chars max)
|
||||
# geo: "" # lattitude and longitude expressed in "geo" notation
|
||||
# osm: "" # Open Street Map Identifier
|
||||
# trailer: # podcast field: podcast:trailer ; used to provider one or more trailers for the podcast or seasons
|
||||
# - resource_file: "" # resource identifier
|
||||
# external_url: "" # URL to the audio file
|
||||
# title: "" # Title of the trailer; max 128 chars
|
||||
# pubdate: "" # date in RFC 2822 format
|
||||
# length: 0 # byte length of the file
|
||||
# type: "" # mime type of the file
|
||||
# season: 0 # season number if this trailer is for a specific season; 0 means that the trailer is for the podcast as a whole
|
||||
# social_interacts: # podcast field: podcast:socialInteracts ; links to interact on social media with the podcast
|
||||
# - protocol: activitypub # one of https://github.com/Podcastindex-org/podcast-namespace/blob/main/socialprotocols.txt
|
||||
# uri: "" # URL of the root post for the channel as a whole
|
||||
# priority: 10
|
||||
# podroll: # podcast field: podcast:podroll
|
||||
# - feed_guid: "" # guid of the other podcast
|
||||
# feed_url: "" # URL of the other podcast if guid is not resolvable
|
||||
# medium: podcast # same indications that the medium parameter
|
||||
# title: "" # name of the other podcast
|
||||
# remote_items:
|
||||
# - feed_guid: "" # guid of the other podcast
|
||||
# feed_url: "" # URL of the other podcast if guid is not resolvable
|
||||
# medium: podcast # same indications that the medium parameter
|
||||
# title: "" # name of the other podcast
|
||||
# update_frequency:
|
||||
# rrule: "" # see rule syntax here https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10
|
||||
# dtstart: "" # date formated as ISO8601 where the reccurrence begins
|
||||
# complete: false # whether no new episodes are expected
|
||||
# description: "" # description of the frequency in natural language
|
||||
cascade:
|
||||
params:
|
||||
author: Florian Maury # podcast field: itunes:author and itunes:owner => itunes:name
|
||||
# persons: # podcast field: podcast:person ; description and links to a podcast participant
|
||||
# - name: Florian Maury
|
||||
# href: https://infosec.exchange/@x_cli
|
||||
# image:
|
||||
# resource_file: "florian.png" # resource identifier ; resource must be in global assets, not page bundles
|
||||
# external_url: "" # url to avatar
|
||||
# group: Cast # as listed in https://github.com/Podcastindex-org/podcast-namespace/blob/main/taxonomy.json
|
||||
# role: Host
|
||||
---
|
12
archetypes/season.md
Normal file
12
archetypes/season.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: ""
|
||||
description: ""
|
||||
date: "2024-10-11T00:00:00Z"
|
||||
draft: false
|
||||
type: season
|
||||
cascade:
|
||||
params:
|
||||
season:
|
||||
number: 0
|
||||
title: ""
|
||||
---
|
452
assets/categories.json
Normal file
452
assets/categories.json
Normal file
|
@ -0,0 +1,452 @@
|
|||
{
|
||||
"Categories": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Arts"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Books"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Design"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Fashion"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Beauty"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Food"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Performing"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Visual"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "Business"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "Careers"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "Entrepreneurship"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "Investing"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "Management"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "Marketing"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "Non-Profit"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "Comedy"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"name": "Interviews"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"name": "Improv"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"name": "Stand-Up"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"name": "Education"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"name": "Courses"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"name": "How-To"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"name": "Language"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "Learning"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"name": "Self-Improvement"
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"name": "Fiction"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"name": "Drama"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"name": "History"
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"name": "Health"
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"name": "Fitness"
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"name": "Alternative"
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"name": "Medicine"
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"name": "Mental"
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"name": "Nutrition"
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"name": "Sexuality"
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"name": "Kids"
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"name": "Family"
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"name": "Parenting"
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"name": "Pets"
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"name": "Animals"
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"name": "Stories"
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"name": "Leisure"
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"name": "Animation"
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"name": "Manga"
|
||||
},
|
||||
{
|
||||
"id": 45,
|
||||
"name": "Automotive"
|
||||
},
|
||||
{
|
||||
"id": 46,
|
||||
"name": "Aviation"
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"name": "Crafts"
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"name": "Games"
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"name": "Hobbies"
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"name": "Home"
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"name": "Garden"
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"name": "Video-Games"
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"name": "Music"
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"name": "Commentary"
|
||||
},
|
||||
{
|
||||
"id": 55,
|
||||
"name": "News"
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"name": "Daily"
|
||||
},
|
||||
{
|
||||
"id": 57,
|
||||
"name": "Entertainment"
|
||||
},
|
||||
{
|
||||
"id": 58,
|
||||
"name": "Government"
|
||||
},
|
||||
{
|
||||
"id": 59,
|
||||
"name": "Politics"
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"name": "Buddhism"
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"name": "Christianity"
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"name": "Hinduism"
|
||||
},
|
||||
{
|
||||
"id": 63,
|
||||
"name": "Islam"
|
||||
},
|
||||
{
|
||||
"id": 64,
|
||||
"name": "Judaism"
|
||||
},
|
||||
{
|
||||
"id": 65,
|
||||
"name": "Religion"
|
||||
},
|
||||
{
|
||||
"id": 66,
|
||||
"name": "Spirituality"
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"name": "Science"
|
||||
},
|
||||
{
|
||||
"id": 68,
|
||||
"name": "Astronomy"
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"name": "Chemistry"
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"name": "Earth"
|
||||
},
|
||||
{
|
||||
"id": 71,
|
||||
"name": "Life"
|
||||
},
|
||||
{
|
||||
"id": 72,
|
||||
"name": "Mathematics"
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"name": "Natural"
|
||||
},
|
||||
{
|
||||
"id": 74,
|
||||
"name": "Nature"
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"name": "Physics"
|
||||
},
|
||||
{
|
||||
"id": 76,
|
||||
"name": "Social"
|
||||
},
|
||||
{
|
||||
"id": 77,
|
||||
"name": "Society"
|
||||
},
|
||||
{
|
||||
"id": 78,
|
||||
"name": "Culture"
|
||||
},
|
||||
{
|
||||
"id": 79,
|
||||
"name": "Documentary"
|
||||
},
|
||||
{
|
||||
"id": 80,
|
||||
"name": "Personal"
|
||||
},
|
||||
{
|
||||
"id": 81,
|
||||
"name": "Journals"
|
||||
},
|
||||
{
|
||||
"id": 82,
|
||||
"name": "Philosophy"
|
||||
},
|
||||
{
|
||||
"id": 83,
|
||||
"name": "Places"
|
||||
},
|
||||
{
|
||||
"id": 84,
|
||||
"name": "Travel"
|
||||
},
|
||||
{
|
||||
"id": 85,
|
||||
"name": "Relationships"
|
||||
},
|
||||
{
|
||||
"id": 86,
|
||||
"name": "Sports"
|
||||
},
|
||||
{
|
||||
"id": 87,
|
||||
"name": "Baseball"
|
||||
},
|
||||
{
|
||||
"id": 88,
|
||||
"name": "Basketball"
|
||||
},
|
||||
{
|
||||
"id": 89,
|
||||
"name": "Cricket"
|
||||
},
|
||||
{
|
||||
"id": 90,
|
||||
"name": "Fantasy"
|
||||
},
|
||||
{
|
||||
"id": 91,
|
||||
"name": "Football"
|
||||
},
|
||||
{
|
||||
"id": 92,
|
||||
"name": "Golf"
|
||||
},
|
||||
{
|
||||
"id": 93,
|
||||
"name": "Hockey"
|
||||
},
|
||||
{
|
||||
"id": 94,
|
||||
"name": "Rugby"
|
||||
},
|
||||
{
|
||||
"id": 95,
|
||||
"name": "Running"
|
||||
},
|
||||
{
|
||||
"id": 96,
|
||||
"name": "Soccer"
|
||||
},
|
||||
{
|
||||
"id": 97,
|
||||
"name": "Swimming"
|
||||
},
|
||||
{
|
||||
"id": 98,
|
||||
"name": "Tennis"
|
||||
},
|
||||
{
|
||||
"id": 99,
|
||||
"name": "Volleyball"
|
||||
},
|
||||
{
|
||||
"id": 100,
|
||||
"name": "Wilderness"
|
||||
},
|
||||
{
|
||||
"id": 101,
|
||||
"name": "Wrestling"
|
||||
},
|
||||
{
|
||||
"id": 102,
|
||||
"name": "Technology"
|
||||
},
|
||||
{
|
||||
"id": 103,
|
||||
"name": "True Crime"
|
||||
},
|
||||
{
|
||||
"id": 104,
|
||||
"name": "TV"
|
||||
},
|
||||
{
|
||||
"id": 105,
|
||||
"name": "Film"
|
||||
},
|
||||
{
|
||||
"id": 106,
|
||||
"name": "After-Shows"
|
||||
},
|
||||
{
|
||||
"id": 107,
|
||||
"name": "Reviews"
|
||||
},
|
||||
{
|
||||
"id": 108,
|
||||
"name": "Climate"
|
||||
},
|
||||
{
|
||||
"id": 109,
|
||||
"name": "Weather"
|
||||
},
|
||||
{
|
||||
"id": 110,
|
||||
"name": "Tabletop"
|
||||
},
|
||||
{
|
||||
"id": 111,
|
||||
"name": "Role-Playing"
|
||||
},
|
||||
{
|
||||
"id": 112,
|
||||
"name": "Cryptocurrency"
|
||||
}
|
||||
]
|
||||
}
|
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module git.broken-by-design.fr/fmaury/podcast-mod
|
||||
|
||||
go 1.22.7
|
6
i18n/en.yaml
Normal file
6
i18n/en.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
season: season
|
||||
seasons: seasons
|
||||
episode: episode
|
||||
episodes: episodes
|
||||
welcome: Welcome on the %s podcast!
|
||||
colon: ":"
|
6
i18n/fr.yaml
Normal file
6
i18n/fr.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
season: saison
|
||||
seasons: saisons
|
||||
episode: épisode
|
||||
episodes: épisodes
|
||||
welcome: Bienvenue sur le podcast %s !
|
||||
colon: " :"
|
41
layouts/episode/single.chapters.json
Normal file
41
layouts/episode/single.chapters.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{{- $chapters := slice -}}
|
||||
{{- with .Params.chapters -}}
|
||||
{{- range . -}}
|
||||
{{- $start_time_value := printf "%.3f" .start_time | cast.ToFloat -}}
|
||||
{{- $entry := dict "startTime" $start_time_value "title" .title -}}
|
||||
{{- with .image -}}
|
||||
{{- $entry = collections.Merge $entry (dict "img" .image) -}}
|
||||
{{- end -}}
|
||||
{{- with .url -}}
|
||||
{{- $entry = collections.Merge $entry (dict "url" .url) -}}
|
||||
{{- end -}}
|
||||
{{- with .toc -}}
|
||||
{{- $entry = collections.Merge $entry (dict "toc" .toc) -}}
|
||||
{{- end -}}
|
||||
{{- with .end_time -}}
|
||||
{{- $end_time_value := printf "%.3f" .end_time | cast.ToFloat -}}
|
||||
{{- $entry = collections.Merge $entry (dict "endTime" $end_time_value) -}}
|
||||
{{- end -}}
|
||||
{{- with .location -}}
|
||||
{{- $name := collections.Index .location "name" -}}
|
||||
{{- $geo := collections.Index .location "geo" -}}
|
||||
{{- $entry = collections.Merge $entry (dict "location" (dict "name" $name "geo" $geo)) -}}
|
||||
{{- end -}}
|
||||
{{- $chapters = collections.Append $entry $chapters -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $version := "1.2.0" -}}
|
||||
{{- $document := dict "version" $version "chapters" $chapters "title" .Title "description" .Description -}}
|
||||
|
||||
{{- with .Params.author -}}
|
||||
{{- $document = collections.Merge $document (dict "author" .) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $podcast_name := "" -}}
|
||||
{{- $podcast_page := collections.Where .Ancestors "Type" "podcast" -}}
|
||||
{{- if eq (len $podcast_page) 1 -}}
|
||||
{{- $document = collections.Merge $document (dict "podcastName" (collections.Index $podcast_page 0).Title) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- encoding.Jsonify (dict "noHTMLEscape" true) $document | safe.JS -}}
|
18
layouts/episode/single.chapterspodlove.json
Normal file
18
layouts/episode/single.chapterspodlove.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{- $chapters := slice -}}
|
||||
{{- with .Params.chapters -}}
|
||||
{{- range . -}}
|
||||
{{ $start_time := collections.Index . "start_time" }}
|
||||
{{- $start_timecode := partial "ms_to_timecode.tmpl" (dict "start_time" $start_time "long_format" true) -}}
|
||||
{{- $image := "" -}}
|
||||
{{- with .image -}}
|
||||
{{- $image = . -}}
|
||||
{{- end -}}
|
||||
{{- $href := "" -}}
|
||||
{{- with .url -}}
|
||||
{{- $href = . -}}
|
||||
{{- end -}}
|
||||
{{- $entry := dict "start" $start_timecode "title" .title "image" $image "href" $href -}}
|
||||
{{- $chapters = collections.Append $entry $chapters -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- encoding.Jsonify (dict "noHTMLEscape" true) $chapters | safe.JS -}}
|
1
layouts/episode/single.transcripthtml.html
Normal file
1
layouts/episode/single.transcripthtml.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{- partial "transcript_content/dispatcher.tmpl" (dict "episode" . "format" "html") -}}
|
1
layouts/episode/single.transcriptjson.json
Normal file
1
layouts/episode/single.transcriptjson.json
Normal file
|
@ -0,0 +1 @@
|
|||
{{- partial "transcript_content/dispatcher.tmpl" (dict "episode" . "format" "json") -}}
|
1
layouts/episode/single.transcriptpodlove.json
Normal file
1
layouts/episode/single.transcriptpodlove.json
Normal file
|
@ -0,0 +1 @@
|
|||
{{- partial "transcript_content/dispatcher.tmpl" (dict "episode" . "format" "podlove") -}}
|
1
layouts/episode/single.transcriptsrt.srt
Normal file
1
layouts/episode/single.transcriptsrt.srt
Normal file
|
@ -0,0 +1 @@
|
|||
{{- partial "transcript_content/dispatcher.tmpl" (dict "episode" . "format" "srt") -}}
|
1
layouts/episode/single.transcriptwebvtt.vtt
Normal file
1
layouts/episode/single.transcriptwebvtt.vtt
Normal file
|
@ -0,0 +1 @@
|
|||
{{- partial "transcript_content/dispatcher.tmpl" (dict "episode" . "format" "webvtt") -}}
|
17
layouts/partials/enclosure_url.rss.xml
Normal file
17
layouts/partials/enclosure_url.rss.xml
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- $episode_page := collections.Index . "episode_page" -}}
|
||||
{{- $guid := collections.Index . "guid" -}}
|
||||
{{- $use_op3 := collections.Index . "use_op3" -}}
|
||||
{{- $url := partial "external_or_local.rss.xml" (dict "context" $ctx "ref_page" $episode_page) -}}
|
||||
{{- if $use_op3 -}}
|
||||
{{- $parsedURL := urls.Parse $url -}}
|
||||
{{- if eq $parsedURL.Scheme "http" -}}
|
||||
{{- $url = printf "https://op3.dev/e,pg=%s/http://%s%s" $guid $parsedURL.Host $parsedURL.RequestURI -}}
|
||||
{{- else -}}
|
||||
{{- $url = printf "https://op3.dev/e,pg=%s/%s%s" $guid $parsedURL.Host $parsedURL.RequestURI -}}
|
||||
{{- end -}}
|
||||
{{- if $parsedURL.Fragment -}}
|
||||
{{- $url = printf "%s#%s" $url $parsedURL.Fragment -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- return $url -}}
|
15
layouts/partials/external_or_local.rss.xml
Normal file
15
layouts/partials/external_or_local.rss.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- $ref_page := collections.Index . "ref_page" -}}
|
||||
|
||||
{{- $url := "" -}}
|
||||
{{- with collections.Index $ctx "external_url" -}}
|
||||
{{- $url = . -}}
|
||||
{{- else -}}
|
||||
{{- $resource_file := collections.Index $ctx "resource_file" -}}
|
||||
{{- with $ref_page.Resources.Get $resource_file -}}
|
||||
{{- $url = .Permalink -}}
|
||||
{{- else -}}
|
||||
{{- errorf "failed to load resource file %q for page %q" $resource_file $ref_page.Title -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- return $url -}}
|
9
layouts/partials/funding.rss.xml
Normal file
9
layouts/partials/funding.rss.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- range $ctx -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:funding url="{{- .url | transform.XMLEscape -}}">
|
||||
{{- .comment | transform.XMLEscape -}}
|
||||
</podcast:funding>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
16
layouts/partials/images.rss.xml
Normal file
16
layouts/partials/images.rss.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- with $ctx.Params.images -}}
|
||||
{{- $image_url_list := slice -}}
|
||||
{{- range . -}}
|
||||
{{- $entry := . -}}
|
||||
{{- $url := partial "external_or_local.rss.xml" (dict "context" . "ref_page" $ctx) -}}
|
||||
{{- $width := collections.Index $entry "width" -}}
|
||||
{{- $attr := printf "%s %sw" $url $width | transform.XMLEscape -}}
|
||||
{{- $image_url_list = append $attr $image_url_list -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:images srcset="{{- delimit $image_url_list "," -}}" />
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
9
layouts/partials/licence.rss.xml
Normal file
9
layouts/partials/licence.rss.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- with $ctx.Params.licence -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:licence url="{{- .url | transform.XMLEscape -}}">
|
||||
{{- .name | transform.XMLEscape -}}
|
||||
</podcast:licence>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
7
layouts/partials/location.rss.xml
Normal file
7
layouts/partials/location.rss.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- with $ctx.Params.location -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:location geo="{{ collections.Index . "geo" | transform.XMLEscape }}" osm="{{ collections.Index . "osm" | transform.XMLEscape }}">{{ collections.Index . "description" | transform.XMLEscape }}</podcast:location>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
22
layouts/partials/ms_to_timecode.tmpl
Normal file
22
layouts/partials/ms_to_timecode.tmpl
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{- $start_time := collections.Index . "start_time" -}}
|
||||
{{- $long_format := collections.Index . "long_format" -}}
|
||||
|
||||
{{- $start_time_ms := math.Floor (math.Mul $start_time 1000) -}}
|
||||
{{- $time_str := "" -}}
|
||||
{{- $hour_cnt := math.Div $start_time_ms 3600000 | math.Floor | cast.ToInt -}}
|
||||
{{- $rem := math.Mod $start_time_ms 3600000 -}}
|
||||
{{- if or $long_format (compare.Gt $hour_cnt 0) -}}
|
||||
{{- $time_str = printf "%02d:" $hour_cnt -}}
|
||||
{{- end -}}
|
||||
{{- $min_cnt := math.Div $rem 60000 | math.Floor | cast.ToInt -}}
|
||||
{{- $rem = math.Mod $rem 60000 -}}
|
||||
{{- if or $long_format $time_str (compare.Gt $min_cnt 0) -}}
|
||||
{{- $time_str = printf "%s%02d:" $time_str $min_cnt -}}
|
||||
{{- end -}}
|
||||
{{- $sec_cnt := math.Div $rem 1000 | math.Floor | cast.ToInt -}}
|
||||
{{- $time_str = printf "%s%02d" $time_str $sec_cnt -}}
|
||||
{{- $ms_cnt := math.Mod $rem 1000 -}}
|
||||
{{- if or $long_format (compare.Gt $ms_cnt 0) -}}
|
||||
{{- $time_str = printf "%s.%03d" $time_str $ms_cnt -}}
|
||||
{{- end -}}
|
||||
{{- return $time_str -}}
|
27
layouts/partials/persons.rss.xml
Normal file
27
layouts/partials/persons.rss.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- range $ctx -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:person role="
|
||||
{{- collections.Index . "role" | transform.XMLEscape -}}
|
||||
" group="
|
||||
{{- collections.Index . "group" | transform.XMLEscape -}}
|
||||
" img="
|
||||
{{- $image := collections.Index . "image" -}}
|
||||
{{- with collections.Index $image "external_url" -}}
|
||||
{{- . | transform.XMLEscape -}}
|
||||
{{- else -}}
|
||||
{{- $resource_file := collections.Index $image "resource_file" -}}
|
||||
{{- with resources.Get $resource_file -}}
|
||||
{{- .Permalink | transform.XMLEscape -}}
|
||||
{{- else -}}
|
||||
{{- errorf "failed to get resource %q" $resource_file -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
" href="
|
||||
{{- collections.Index . "href" | transform.XMLEscape -}}
|
||||
">
|
||||
{{- collections.Index . "name" | transform.XMLEscape -}}
|
||||
</podcast:person>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
10
layouts/partials/podlove_chapters.rss.xml
Normal file
10
layouts/partials/podlove_chapters.rss.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $start_time := collections.Index $ctx "start_time" -}}
|
||||
{{- $title := collections.Index $ctx "title" -}}
|
||||
|
||||
{{- $time_str := partial "ms_to_timecode.tmpl" (dict "start_time" $start_time "long_format" false) -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<psc:chapter start="{{- $time_str -}}" title="{{- $title -}}" />
|
||||
{{- "\n" -}}
|
11
layouts/partials/recommendations.rss.xml
Normal file
11
layouts/partials/recommendations.rss.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- range $ctx -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:recommendations url="
|
||||
{{- collections.Index . "url" | transform.XMLEscape -}}
|
||||
" type="application/json" language="
|
||||
{{- collections.Index . "language" | transform.XMLEscape -}}
|
||||
" />
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
15
layouts/partials/remoteItems.rss.xml
Normal file
15
layouts/partials/remoteItems.rss.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- range $ctx -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:remoteItem
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
feedGuid="{{- collections.Index . "feed_guid" -}}"
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
feedUrl="{{- collections.Index . "feed_url" -}}"
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
medium="{{- collections.Index . "medium" -}}"
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
title="{{- collections.Index . "title" -}}" />
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
13
layouts/partials/socialInteracts.rss.xml
Normal file
13
layouts/partials/socialInteracts.rss.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{- $indent := collections.Index . "indent" -}}
|
||||
{{- $ctx := collections.Index . "context" -}}
|
||||
{{- range $ctx -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:socialInteract protocol="
|
||||
{{- collections.Index . "protocol" | transform.XMLEscape -}}
|
||||
" uri="
|
||||
{{- collections.Index . "uri" | transform.XMLEscape -}}
|
||||
" priority="
|
||||
{{- collections.Index . "priority" | transform.XMLEscape -}}
|
||||
" />
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
13
layouts/partials/timecode_to_ms.tmpl
Normal file
13
layouts/partials/timecode_to_ms.tmpl
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{- $retvalue := 0 -}}
|
||||
{{- $parts := strings.Split . ":" -}}
|
||||
{{- if ne (len $parts) 3 -}}
|
||||
{{- errorf "invalid timestamp %q" . -}}
|
||||
{{- else -}}
|
||||
{{- $hours := collections.Index $parts 0 | cast.ToInt -}}
|
||||
{{- $minutes := collections.Index $parts 1 | cast.ToInt -}}
|
||||
{{- $parts2 := strings.Split (collections.Index $parts 2) "," -}}
|
||||
{{- $seconds := collections.Index $parts2 0 | cast.ToInt -}}
|
||||
{{- $milliseconds := collections.Index $parts2 1 | cast.ToInt -}}
|
||||
{{- $retvalue = math.Add $retvalue (math.Mul $hours 3600 1000) (math.Mul $minutes 60 1000) (math.Mul $seconds 1000) $milliseconds -}}
|
||||
{{- end -}}
|
||||
{{- return $retvalue -}}
|
23
layouts/partials/transcript.rss.xml
Normal file
23
layouts/partials/transcript.rss.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{- $url := collections.Index . "resource" -}}
|
||||
{{- $type := collections.Index . "type" -}}
|
||||
{{- $lang := collections.Index . "lang" -}}
|
||||
{{- $rel := collections.Index . "rel" -}}
|
||||
{{- $episode_page := collections.Index . "episode_page" -}}
|
||||
{{- $indent := collections.Index . "indent" -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:transcript url="{{- $url | transform.XMLEscape -}}" type="{{- $type | transform.XMLEscape -}}"
|
||||
|
||||
{{- with $lang -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
language="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
|
||||
{{- with collections.Index . "rel" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
rel="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
/>
|
||||
{{- "\n" -}}
|
18
layouts/partials/transcript_content/dispatcher.tmpl
Normal file
18
layouts/partials/transcript_content/dispatcher.tmpl
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{- $ctx := . -}}
|
||||
{{- if reflect.IsMap $ctx -}}
|
||||
{{- with $ctx.episode.Params.transcript -}}
|
||||
{{- range . -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- if eq .language $ctx.episode.Lang -}}
|
||||
{{- $resource_name := .content -}}
|
||||
{{- with $ctx.episode.Resources.Get $resource_name -}}
|
||||
{{- $transcript := . | transform.Unmarshal -}}
|
||||
{{- partial (printf "transcript_content/%s.tmpl" $ctx.format) $transcript -}}
|
||||
{{- else -}}
|
||||
{{- errorf "failed to get resource %q for episode %q" $resource_name $ctx.episode.Title -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
20
layouts/partials/transcript_content/html.tmpl
Normal file
20
layouts/partials/transcript_content/html.tmpl
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{- range . -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- with .speaker -}}
|
||||
<cite>{{- . | transform.HTMLEscape -}}</cite>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- with .start -}}
|
||||
<time>{{- strings.Replace . "," "." | transform.HTMLEscape -}}</time>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
<p>
|
||||
{{- .line | transform.HTMLEscape -}}
|
||||
{{- with .line2 -}}
|
||||
{{- " " | transform.HTMLEscape -}}
|
||||
{{- . | transform.HTMLEscape -}}
|
||||
{{- end -}}
|
||||
</p>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
25
layouts/partials/transcript_content/json.tmpl
Normal file
25
layouts/partials/transcript_content/json.tmpl
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{- $segments := slice -}}
|
||||
{{- range . -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- $start_ms := partial "timecode_to_ms.tmpl" .start -}}
|
||||
{{- $end_ms := partial "timecode_to_ms.tmpl" .end -}}
|
||||
{{- $start_secs := math.Div $start_ms 1000.0 -}}
|
||||
{{- $end_secs := math.Div $end_ms 1000.0 -}}
|
||||
{{- $concat := true -}}
|
||||
{{- if and .speaker2 (ne .speaker .speaker2) -}}
|
||||
{{- $entry := dict "startTime" $start_secs "endTime" $end_secs "speaker" .speaker "body" .line -}}
|
||||
{{- $entry2 := dict "startTime" $start_secs "endTime" $end_secs "speaker" .speaker2 "body" .line2 -}}
|
||||
{{- $segments = collections.Append $entry $entry2 $segments -}}
|
||||
{{- $concat = false -}}
|
||||
{{- end -}}
|
||||
{{- if $concat -}}
|
||||
{{- $body := .line -}}
|
||||
{{- if .line2 -}}
|
||||
{{- $body = printf "%s %s" $body .line2 -}}
|
||||
{{- end -}}
|
||||
{{- $entry := dict "startTime" $start_secs "endTime" $end_secs "speaker" .speaker "body" $body -}}
|
||||
{{- $segments = collections.Append $entry $segments -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- dict "version" "1.0.0" "segments" $segments | encoding.Jsonify (dict "indent" " ") -}}
|
25
layouts/partials/transcript_content/podlove.tmpl
Normal file
25
layouts/partials/transcript_content/podlove.tmpl
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{- $segments := slice -}}
|
||||
{{- range . -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- $start_dot := strings.Replace .start "," "." -}}
|
||||
{{- $end_dot := strings.Replace .end "," "." -}}
|
||||
{{- $start_ms := partial "timecode_to_ms.tmpl" .start -}}
|
||||
{{- $end_ms := partial "timecode_to_ms.tmpl" .end -}}
|
||||
{{- $concat := true -}}
|
||||
{{- if and .speaker2 (ne .speaker .speaker2) -}}
|
||||
{{- $entry := dict "start" $start_dot "start_ms" $start_ms "end" $end_dot "end_ms" $end_ms "speaker" "" "voice" .speaker "text" .line -}}
|
||||
{{- $entry2 := dict "start" $start_dot "start_ms" $start_ms "end" $end_dot "end_ms" $end_ms "speaker" "" "voice" .speaker2 "text" .line2 -}}
|
||||
{{- $segments = collections.Append $entry $entry2 $segments -}}
|
||||
{{- $concat = false -}}
|
||||
{{- end -}}
|
||||
{{- if $concat -}}
|
||||
{{- $text := .line -}}
|
||||
{{- if .line2 -}}
|
||||
{{- $text = printf "%s %s" $text .line2 -}}
|
||||
{{- end -}}
|
||||
{{- $entry := dict "start" $start_dot "start_ms" $start_ms "end" $end_dot "end_ms" $end_ms "speaker" "" "voice" .speaker "text" $text -}}
|
||||
{{- $segments = collections.Append $entry $segments -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $segments | encoding.Jsonify (dict "indent" " ") -}}
|
13
layouts/partials/transcript_content/srt.tmpl
Normal file
13
layouts/partials/transcript_content/srt.tmpl
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{- $counter := 1 -}}
|
||||
{{- range . -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- printf "%d\n" $counter -}}
|
||||
{{- printf "%s --> %s\n" .start .end | safe.HTML -}}
|
||||
{{- printf "%s\n" .line | safe.HTML -}}
|
||||
{{- with .line2 -}}
|
||||
{{- printf "%s\n" . | safe.HTML -}}
|
||||
{{- end -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- $counter = add $counter 1 -}}
|
||||
{{- end -}}
|
24
layouts/partials/transcript_content/webvtt.tmpl
Normal file
24
layouts/partials/transcript_content/webvtt.tmpl
Normal file
|
@ -0,0 +1,24 @@
|
|||
WEBVTT
|
||||
{{- "\n\n" -}}
|
||||
{{- range . -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- printf "%s --> %s\n" .start .end | safe.HTML -}}
|
||||
{{- with .speaker -}}
|
||||
{{- printf "<v %s>" (. | transform.HTMLEscape) | safe.HTML -}}
|
||||
{{- end -}}
|
||||
{{- printf "%s" .line | safe.HTML -}}
|
||||
{{- if .line2 -}}
|
||||
{{- $to_print := true -}}
|
||||
{{- if .speaker2 -}}
|
||||
{{- if ne .speaker .speaker2 -}}
|
||||
{{- printf "</v><v %s>%s</v>" (.speaker2 | transform.HTMLEscape) .line | safe.HTML -}}
|
||||
{{- $to_print = false -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if $to_print -}}
|
||||
{{- printf " %s" .line2 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- "\n\n" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
39
layouts/podcast/section.html.html
Normal file
39
layouts/podcast/section.html.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<header><h1>{{ printf (T "welcome") .Title }}</h1></header>
|
||||
<nav>
|
||||
{{- $season_cnt := 0 -}}
|
||||
{{- $season_lst := slice -}}
|
||||
{{- range .Sections -}}
|
||||
{{- if eq .Type "season" -}}
|
||||
{{- $season_cnt = add $season_cnt 1 -}}
|
||||
{{- $season_lst = collections.Append (dict "number" .Params.season.number "title" .Params.season.title "object" .) $season_lst -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if gt $season_cnt 0 -}}
|
||||
<section>
|
||||
<h2>
|
||||
{{- printf "%s%s" (T "seasons" | strings.FirstUpper) (T "colon") -}}
|
||||
</h2>
|
||||
{{- $season_lst = collections.Sort $season_lst "number" "asc" -}}
|
||||
{{- end -}}
|
||||
{{- range $season_lst -}}
|
||||
<article>
|
||||
<p><a href="{{- (collections.Index . "object").RelPermalink -}}">{{- printf "%s %d%s %s" (T "season" | strings.FirstUpper) (collections.Index . "number") (T "colon") (collections.Index . "title") -}}</a></p>
|
||||
</article>
|
||||
{{- end -}}
|
||||
</section>
|
||||
<section>
|
||||
<h2>
|
||||
{{- printf "%s%s" (T "episodes" | strings.FirstUpper ) (T "colon") -}}
|
||||
</h2>
|
||||
{{ range .RegularPagesRecursive }}
|
||||
<article>
|
||||
<p><a href="{{- .RelPermalink -}}">
|
||||
{{- if .Params.season -}}
|
||||
{{- printf "%s %d%s " (T "season" | strings.FirstUpper) (collections.Index .Params.season "number") (T "colon") -}}
|
||||
{{- end -}}
|
||||
{{- .Title -}}
|
||||
</a></p>
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
</nav>
|
507
layouts/podcast/section.rss.xml
Normal file
507
layouts/podcast/section.rss.xml
Normal file
|
@ -0,0 +1,507 @@
|
|||
{{- $use_op3 := .Params.use_op3 -}}
|
||||
{{- $guid := .Params.guid -}}
|
||||
{{- $podcast_type := "" -}}
|
||||
{{- /* Either external_url or resource_file must be defined; use external_url if it is defined. If not, get the resource designated by the resource_file parameter. The resource identifier must be relative to the podcast directory */ -}}
|
||||
{{- $image := "" -}}
|
||||
{{- if collections.Index .Params.image "external_url" -}}
|
||||
{{- collections.Index .Params.image "external_url" | transform.XMLEscape -}}
|
||||
{{- else if collections.Index .Params.image "resource_file" -}}
|
||||
{{- with collections.Index .Params.image "resource_file" | .Resources.Get -}}
|
||||
{{- $image = .Permalink -}}
|
||||
{{- else -}}
|
||||
{{- errorf "failed to fetch resource %q" (collections.Index .Params.image "resource_file") -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "empty image parameter on the podcast %q definition" .Title -}}
|
||||
{{- end -}}
|
||||
{{- $indent := 2 -}}
|
||||
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
||||
<channel>
|
||||
<title>
|
||||
{{- .Title | transform.XMLEscape -}}
|
||||
</title>
|
||||
<description>
|
||||
{{- .Description | transform.XMLEscape -}}
|
||||
</description>
|
||||
<generator>Hugo (with git.broken-by-design.fr/fmaury/podcast-mod)</generator>
|
||||
<lastBuildDate>
|
||||
{{- time.Now.Format "Mon, 02 Jan 2006 15:04:05 MST" -}}
|
||||
</lastBuildDate>
|
||||
<language>
|
||||
{{- .Language.Lang -}}
|
||||
</language>
|
||||
<itunes:image>
|
||||
{{- $image -}}
|
||||
</itunes:image>
|
||||
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
|
||||
<itunes:explicit>{{ .Params.explicit | transform.XMLEscape }}</itunes:explicit>
|
||||
<podcast:guid>{{ .Params.guid | transform.XMLEscape }}</podcast:guid>
|
||||
{{- "\n" -}}
|
||||
|
||||
{{- with .Params.copyright -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<copyright>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</copyright>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Categories are restricted to a set of values. The acceptable values are listed here: https://github.com/Podcastindex-org/podcast-namespace/blob/main/categories.json */ -}}
|
||||
{{- /* The following code ensures the attribute is set (Apple requires it) and validates the value against the list of acceptable values */ -}}
|
||||
{{- with .Params.category }}
|
||||
{{- $category := "" -}}
|
||||
{{- $categories := resources.Get "categories.json" | transform.Unmarshal -}}
|
||||
{{- $categoryFound := 0 -}}
|
||||
{{- range ( collections.Index $categories "Categories") -}}
|
||||
{{- if collections.Index . "name" | compare.Eq $.Params.category -}}
|
||||
{{- $categoryFound = 1 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if $categoryFound -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:category>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</itunes:category>
|
||||
{{- "\n" -}}
|
||||
{{- else -}}
|
||||
{{- errorf "could not find %q in known categories" . -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "missing category definition for podcast %q" .Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.website_link }}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<link>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</link>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.author -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:author>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</itunes:author>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.podcast_type -}}
|
||||
{{- $podcast_type = . -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:type>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</itunes:type>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and .Params.author .Params.email -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:owner>
|
||||
{{- "\n" -}}
|
||||
{{- strings.Repeat (add $indent 1) " " -}}
|
||||
<itunes:name>
|
||||
{{- .Params.author | transform.XMLEscape -}}
|
||||
</itunes:name>
|
||||
{{- "\n" -}}
|
||||
{{- strings.Repeat (add $indent 1) " " -}}
|
||||
<itunes:email>
|
||||
{{- .Params.email | transform.XMLEscape -}}
|
||||
</itunes:email>
|
||||
{{- "\n" -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
</itunes:owner>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and .Params.email .Params.locked -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:locked owner="{{ .Params.email | transform.XMLEscape }}">
|
||||
{{- .Params.locked | transform.XMLEscape -}}
|
||||
</podcast:locked>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.medium -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:medium>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</podcast:medium>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "licence.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
|
||||
{{- partial "images.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
|
||||
{{- with .Params.funding -}}
|
||||
{{- partial "funding.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "location.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
|
||||
{{- with .Params.trailer -}}
|
||||
{{- range . -}}
|
||||
{{- $season_attr := "" -}}
|
||||
{{- $url := "" -}}
|
||||
{{- with collections.Index . "resource_file" | $.Resources.Get -}}
|
||||
{{- $url = .Permalink -}}
|
||||
{{- else -}}
|
||||
{{- $url = collections.Index . "external_url" -}}
|
||||
{{- end -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:trailer
|
||||
{{- " " -}}
|
||||
pubdate="{{- collections.Index . "pubdate" | transform.XMLEscape -}}"
|
||||
{{- " " -}}
|
||||
url="{{- $url -}}"
|
||||
{{- " " -}}
|
||||
length="{{- collections.Index . "length" | transform.XMLEscape -}}"
|
||||
{{- " " -}}
|
||||
type="{{- collections.Index . "type" | transform.XMLEscape -}}"
|
||||
{{- if collections.Index . "season" -}}
|
||||
{{- " " -}}
|
||||
season="{{- collections.Index . "season" | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
>
|
||||
{{- collections.Index . "title" | transform.XMLEscape -}}
|
||||
</podcast:trailer>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.social_interacts -}}
|
||||
{{- partial "socialInteracts.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.podroll -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:podroll>
|
||||
{{- partial "remoteItems.rss.xml" (dict "context" . "indent" (add $indent 1)) -}}
|
||||
</podcast:podroll>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.remote_items -}}
|
||||
{{- partial "remoteItems.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.update_frequency -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:updateFrequency
|
||||
{{- if collections.Index . "complete" -}}
|
||||
{{- " " -}}
|
||||
complete="true"
|
||||
{{- else -}}
|
||||
{{- $dtstart := collections.Index . "dtstart" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
rrule="{{- collections.Index . "rrule" | transform.XMLEscape -}}"
|
||||
{{- if $dtstart -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
dtstart="{{- $dtstart | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
>
|
||||
{{- collections.Index . "description" | transform.XMLEscape -}}
|
||||
</podcast:updateFrequency>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.recommendations -}}
|
||||
{{- partial "recommendations.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.persons -}}
|
||||
{{- partial "persons.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range .RegularPagesRecursive.ByDate.Reverse -}}
|
||||
{{- $episode_page := . -}}
|
||||
{{- $episode_title := .Title -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<item>
|
||||
{{- "\n" -}}
|
||||
{{- $indent = add $indent 1 -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<title>
|
||||
{{- .Title | transform.XMLEscape -}}
|
||||
</title>
|
||||
{{- "\n" -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<guid>
|
||||
{{- with .Params.guid -}}
|
||||
{{- . | transform.XMLEscape -}}
|
||||
{{- else -}}
|
||||
{{- errorf "missing required guid parameter for episode %q" $episode_title -}}
|
||||
{{- end -}}
|
||||
</guid>
|
||||
{{- "\n" -}}
|
||||
|
||||
{{- with .Params.enclosure -}}
|
||||
{{- $url := partial "enclosure_url.rss.xml" (dict "context" . "episode_page" $episode_page "guid" $guid "use_op3" $use_op3) -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<enclosure
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
url="{{- $url | transform.XMLEscape -}}"
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
type="{{- collections.Index . "type" | transform.XMLEscape -}}"
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
length="{{- collections.Index . "length" | transform.XMLEscape -}}"
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
/>
|
||||
{{- "\n" -}}
|
||||
{{- else -}}
|
||||
{{- errorf "missing required enclosure parameter for episode %q" $episode_title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<pubDate>
|
||||
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" | transform.XMLEscape -}}
|
||||
</pubDate>
|
||||
{{- "\n" -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<description>
|
||||
{{- .Description | transform.XMLEscape -}}
|
||||
</description>
|
||||
{{- "\n" -}}
|
||||
|
||||
{{- with .Params.duration -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:duration>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</itunes:duration>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<link>
|
||||
{{- .Permalink | transform.XMLEscape -}}
|
||||
</link>
|
||||
{{- "\n" -}}
|
||||
|
||||
{{- with .Params.image -}}
|
||||
{{ $url := ""}}
|
||||
{{- with collections.Index . "external_url" -}}
|
||||
{{- $url = . -}}
|
||||
{{- else -}}
|
||||
{{- $resource_file := collections.Index . "resource_file" -}}
|
||||
{{- with $episode_page.Resources.Get $resource_file -}}
|
||||
{{- $url = .Permalink -}}
|
||||
{{- else -}}
|
||||
{{- errorf "failed to get resource %q for episode %q" $resource_file $episode_title -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:image>
|
||||
{{- $url | transform.XMLEscape -}}
|
||||
</itunes:image>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.explicit -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:explicit>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</itunes:explicit>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.episode_number -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:episode>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</itunes:episode>
|
||||
{{- "\n" -}}
|
||||
{{- else -}}
|
||||
{{- if eq $podcast_type "serial" -}}
|
||||
{{- errorf "missing episode number for episode %q while podcast type is serial" $episode_title -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.season -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:season>
|
||||
{{- collections.Index . "number" | transform.XMLEscape -}}
|
||||
</itunes:season>
|
||||
{{- "\n" -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:season
|
||||
{{- with collections.Index . "title" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
season="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
>
|
||||
{{- collections.Index . "number" | transform.XMLEscape -}}
|
||||
</podcast:season>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.episode_type -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<itunes:episodeType>
|
||||
{{- . | transform.XMLEscape -}}
|
||||
</itunes:episodeType>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.alternate_enclosures -}}
|
||||
{{- range . -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:alternateEnclosure
|
||||
{{- with collections.Index . "type" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
type="{{- . | transform.XMLEscape -}}"
|
||||
{{- else -}}
|
||||
{{- errorf "alternate enclosure missing required attribute type for episode %q: %q" $episode_title . -}}
|
||||
{{- end -}}
|
||||
{{- with collections.Index . "length" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
length="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
{{- with collections.Index . "bitrate" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
bitrate="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
{{- with collections.Index . "lang" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
lang="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
{{- with collections.Index . "title" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
title="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
{{- with collections.Index . "codecs" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
codecs="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
>
|
||||
{{- "\n" -}}
|
||||
|
||||
{{- with collections.Index . "sri_hash" -}}
|
||||
{{- strings.Repeat (add $indent 1) " " -}}
|
||||
<podcast:integrity type="sri" value="{{- . | transform.XMLEscape -}}" />
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- range collections.Index . "sources" -}}
|
||||
{{- $url := partial "enclosure_url.rss.xml" (dict "context" . "episode_page" $episode_page "guid" $guid "use_op3" $use_op3) -}}
|
||||
{{- strings.Repeat (add $indent 1) " " -}}
|
||||
<podcast:source uri="{{- $url | transform.XMLEscape -}}"
|
||||
{{- with collections.Index . "type" -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
contentType="{{- . | transform.XMLEscape -}}"
|
||||
{{- end -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
/>
|
||||
{{- end -}}
|
||||
{{- "\n" -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
</podcast:alternateEnclosure>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.transcript -}}
|
||||
{{- range . -}}
|
||||
{{- $rel := collections.Index . "rel" -}}
|
||||
{{- $lang := collections.Index . "language" -}}
|
||||
{{- $srt_url := "" -}}
|
||||
{{- $webvtt_url := "" -}}
|
||||
{{- $html_url := "" -}}
|
||||
{{- $json_url := "" -}}
|
||||
{{- with collections.Index . "content" -}}
|
||||
{{- /* if content is defined, it means we are generating the transcripts ourselves */ -}}
|
||||
{{- with $episode_page.OutputFormats.Get "transcriptsrt" -}}
|
||||
{{- $srt_url = .Permalink -}}
|
||||
{{- end -}}
|
||||
{{- with $episode_page.OutputFormats.Get "transcriptwebvtt" -}}
|
||||
{{- $webvtt_url = .Permalink -}}
|
||||
{{- end -}}
|
||||
{{- with $episode_page.OutputFormats.Get "transcripthtml" -}}
|
||||
{{- $html_url = .Permalink -}}
|
||||
{{- end -}}
|
||||
{{- with $episode_page.OutputFormats.Get "transcriptjson" -}}
|
||||
{{- $json_url = .Permalink -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $external_content := collections.Index . "external_content" -}}
|
||||
{{- $srt_url = collections.Index $external_content "srt" -}}
|
||||
{{- $webvtt_url = collections.Index $external_content "webvtt" -}}
|
||||
{{- $html_url = collections.Index $external_content "html" -}}
|
||||
{{- $json_url = collections.Index $external_content "json" -}}
|
||||
{{- end -}}
|
||||
{{- with $srt_url -}}
|
||||
{{- partial "transcript.rss.xml" (dict "resource" . "type" "application/x-subrip" "lang" $lang "rel" $rel "episode_page" $episode_page "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
{{- with $webvtt_url -}}
|
||||
{{- partial "transcript.rss.xml" (dict "resource" . "type" "text/webvtt" "lang" $lang "rel" $rel "episode_page" $episode_page "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
{{- with $html_url -}}
|
||||
{{- partial "transcript.rss.xml" (dict "resource" . "type" "text/html" "lang" $lang "rel" $rel "episode_page" $episode_page "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
{{- with $json_url -}}
|
||||
{{- partial "transcript.rss.xml" (dict "resource" . "type" "application/json" "lang" $lang "rel" $rel "episode_page" $episode_page "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.funding -}}
|
||||
{{- partial "funding.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.persons -}}
|
||||
{{- partial "persons.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.social_interacts -}}
|
||||
{{- partial "socialInteracts.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.recommendations -}}
|
||||
{{- partial "recommendations.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "images.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- partial "licence.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
{{- partial "location.rss.xml" (dict "context" . "indent" $indent) -}}
|
||||
|
||||
{{- with .Params.soundbites -}}
|
||||
{{- range . -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:soundbite startTime="{{- collections.Index . "start_time" | transform.XMLEscape -}}" duration="{{- collections.Index . "duration" -}}"
|
||||
{{- with collections.Index . "title" -}}
|
||||
>{{- . | transform.XMLEscape -}}</podcast:soundbite>
|
||||
{{- else -}}
|
||||
{{- " " | safe.HTMLAttr -}}
|
||||
/>
|
||||
{{- end -}}
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.chapters -}}
|
||||
{{- with $episode_page.OutputFormats.Get "chapters" -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<podcast:chapters url="{{ .Permalink }}" type="application/json+chapters" />
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
<psc:chapters version="1.2" xmlns:psc="http://podlove.org/simple-chapters">
|
||||
{{- "\n" -}}
|
||||
{{- range . -}}
|
||||
{{- partial "podlove_chapters.rss.xml" (dict "context" . "indent" (add $indent 1)) -}}
|
||||
{{- end -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
</psc:chapters>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $indent = sub $indent 1 -}}
|
||||
{{- strings.Repeat $indent " " -}}
|
||||
</item>
|
||||
{{- "\n" -}}
|
||||
{{- end -}}
|
||||
</channel>
|
||||
</rss>
|
5
layouts/podcasts/podcasts.html.html
Normal file
5
layouts/podcasts/podcasts.html.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<p>{{ .Title }}</p>
|
||||
{{ $subSections := .Sections }}
|
||||
{{ range $subSections }}
|
||||
<p><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
|
||||
{{ end }}
|
4
layouts/season/section.html.html
Normal file
4
layouts/season/section.html.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
Episodes :
|
||||
{{ range .RegularPages }}
|
||||
<p>{{ .Title }}</p>
|
||||
{{ end }}
|
Loading…
Reference in a new issue