Skip to content

Commit 8bfc9f6

Browse files
authored
Merge pull request #1 from FromCodeToProd/rss
RSS: draft
2 parents cc331b6 + b6e876e commit 8bfc9f6

4 files changed

Lines changed: 100 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
11
# fromcodetoprod.com
2+
3+
## Episodes
4+
5+
Please note that these parameters are important not only for the website
6+
but also for the RSS feeds.
7+
8+
- `date` - date of the episode, e.g. `"2019-11-27"`
9+
- `draft` - `true | false`
10+
- `episode` - unique number of the episode, e.g. `"001"`
11+
- `title` - title of the episode
12+
- `link` - unique permanent link to the episode, e.g. `"cdn.fromcodetoprod.com/episodes/001.mp3"`
13+
- `length` - file size in bytes
14+
- `duration` - episode duration (it's [recommended by Apple](https://help.apple.com/itc/podcasts_connect/#/itcb54353390) to use seconds)
15+
- `lang` = `"en" | "ru"`
16+
17+
## RSS
18+
19+
Itunes template is defined in `layouts/episodes/rss.xml`.
20+
21+
List of [actual itunes categories](https://help.apple.com/itc/podcasts_connect/#/itc9267a2f12).

config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,26 @@ defaultContentLanguageInSubdir: true
1818
languages:
1919
en:
2020
weight: 1
21+
title: From Code To Prod Podcast
22+
params:
23+
copyright: Copyright 2019 From Code To Prod
24+
image:
25+
description:
26+
itunes:
27+
subtitle:
28+
author: Alexey Palazhchenko, Elena Grahovac
29+
owner:
30+
name: From Code To Prod Podcast
31+
email: hello@fromcodetoprod.com
2132
ru:
2233
weight: 2
34+
title: Подкаст От кода до прода
35+
params:
36+
copyright: Copyright 2019 From Code To Prod
37+
description:
38+
itunes:
39+
subtitle:
40+
author:
2341

2442
languageCode: en-us
2543

content/episodes/2019/11-27-001.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
+++
2+
date = "2019-11-27 19:00:00 +0200"
3+
draft = true
4+
episode = "001"
5+
title = "Test"
6+
link = "cdn.fromcodetoprod.com/episodes/001.mp3"
7+
length = 26005755
8+
duration = 3852
9+
lang = "en"
10+
+++
11+
12+
## Topics
13+
14+
- Topic 1
15+
- Topic 2
16+
- Topic 3
17+
- Topic 4
18+
- Topic 5
19+
20+
## Hosts and guests
21+
22+
This episode is hosted by [Elena](https://twitter.com/webdeva) and [Alexey](https://twitter.com/paaleksey).This episode is hosted by [Elena](https://twitter.com/webdeva) and [Alexey](https://twitter.com/paaleksey).

layouts/episodes/rss.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
2+
<channel>
3+
<title>{{ .Title }}</title>
4+
<link>{{ .Permalink }}</link>
5+
<language>{{ .Site.LanguageCode }}</language>
6+
<copyright>{{ .Site.Params.Copyright }}</copyright>
7+
8+
<itunes:subtitle>{{ .Site.Params.Itunes.Subtitle }}</itunes:subtitle>
9+
<itunes:summary>{{ .Site.Params.Description }}</itunes:summary>
10+
<description>{{ .Site.Params.Description }}</description>
11+
12+
<itunes:author>{{ .Site.Params.Itunes.Author }}</itunes:author>
13+
<itunes:owner>
14+
<itunes:name>{{ .Site.Params.Itunes.Owner.Name }}</itunes:name>
15+
<itunes:email>{{ .Site.Params.Itunes.Owner.Email }}</itunes:email>
16+
</itunes:owner>
17+
18+
<itunes:image href="{{ .Site.Params.Image }}" />
19+
<itunes:category text="Technology" />
20+
21+
{{ range .Pages }}
22+
{{ if eq .Lang $.Lang }}
23+
<item>
24+
<title>{{ .Date }}</title>
25+
<itunes:author>{{ $.Site.Params.Itunes.Author }}</itunes:author>
26+
27+
<itunes:summary>{{ `<![CDATA[` | safeHTML }}{{ .Content }}{{ `]]>` | safeHTML }}</itunes:summary>
28+
<description>{{ `<![CDATA[` | safeHTML }}{{ .Content }}{{ `]]>` | safeHTML }}</description>
29+
30+
<enclosure url="{{ .Params.link }}" length="{{ .Params.length}}" type="audio/mpeg" />
31+
<guid>{{ .Params.link }}</guid>
32+
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
33+
34+
<itunes:duration>{{ .Params.duration }}</itunes:duration>
35+
<link>{{ .Permalink }}</link>
36+
</item>
37+
{{ end }}
38+
{{ end }}
39+
</channel>
40+
</rss>

0 commit comments

Comments
 (0)