Skip to content

Instantly share code, notes, and snippets.

@jsntn

jsntn/_config.yml

Forked from agarrharr/feed.rss
Created Oct 21, 2017
Embed
What would you like to do?
Jekyll Podcast Feed
author:
email:
name:
url:
# PODCAST
license: CC-BY-SA
podcast:
title:
subtitle:
url: /podcast.html
albumCover: /images/xxx.jpg
summary: >
xxx
xxx
layout title subtitle update category tags place weather permalink description duration length mp3
post
podcast
900
1065610
---
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:atom="http://www.w3.org/2005/Atom/"
xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
<title>{{ site.podcast.title }}</title>
<link>{{ site.url }}</link>
<description><![CDATA[{{ site.podcast.summary }}]]></description>
<copyright>{{ site.license }} 2007-{{ site.time | date:"%Y" }} {{ site.podcast.title }}</copyright>
<language>zh-cn</language>
<managingEditor>{{ site.author }} ({{ site.email }})</managingEditor>
<webMaster>{{ site.author }} ({{ site.email }})</webMaster>
<pubDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S GMT" }}</pubDate>
<lastBuildDate>{{ site.time | date: "%a, %d %b %Y" }}</lastBuildDate>
<image>
<link>{{ site.url }}{{ site.podcast.url }}</link>
<url>{{ site.url }}{{ site.podcast.albumCover }}</url>
<title>{{ site.podcast.title }}</title>
</image>
<generator>{{ site.name }}</generator>
<itunes:author>{{ site.author }}</itunes:author>
<itunes:category text="Society &amp; Culture">
<itunes:category text="Personal Journals" />
</itunes:category>
<itunes:explicit>No</itunes:explicit>
<itunes:subtitle>{{ site.podcast.subtitle }}</itunes:subtitle>
<itunes:summary><![CDATA[{{ site.podcast.summary }}]]></itunes:summary>
<itunes:keywords></itunes:keywords>
<itunes:owner>
<itunes:name>{{ site.author }}</itunes:name>
<itunes:email>{{ site.email }}</itunes:email>
</itunes:owner>
<itunes:image href="{{ site.url }}{{ site.podcast.albumCover }}" />
{% assign counter = 0 %}
{% for post in site.posts %}
{% if post.tags contains "podcast" %}
{% assign counter = counter | plus: 1 %}
{% if counter == 30 %}
{% break %}
{% endif %}
<item>
<title>{{ post.title }}</title>
<link>{{ site.url }}{{ post.url }}</link>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S GMT" }}</pubDate>
<guid isPermaLink="true">{{ post.mp3 }}</guid>
<enclosure length="{{ post.length }}" url="{{ post.mp3 }}" type="audio/mpeg"/>
<description><![CDATA[{{ post.description }}<br /><br />via <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>]]></description>
<content:encoded><![CDATA[{{ post.description }}<br /><br />via <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>]]></content:encoded>
<itunes:explicit>No</itunes:explicit>
<itunes:author>{{ site.author }}</itunes:author>
<itunes:duration>{{ post.duration }}</itunes:duration>
<itunes:subtitle><![CDATA[{{ post.subtitle }}]]></itunes:subtitle>
<itunes:image href="{% if post.image %}{{ site.url }}{{ post.image }}{% else %}{{ site.url }}{{ site.podcast.albumCover }}{% endif %}" />
<itunes:keywords>{{ post.tags | array_to_sentence_string }}</itunes:keywords>
<itunes:summary><![CDATA[{{ post.description }}<br /><br />via <a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a>]]></itunes:summary>
</item>
{% endif %}
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment