Skip to content

Commit

Permalink
🐛 Use siteUrl and mdx frontmatter slug for item link
Browse files Browse the repository at this point in the history
Add spotify rss spec to README
  • Loading branch information
miller-productions committed Feb 10, 2020
1 parent c20b9b3 commit f38003d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ module.exports = {
// In each `.mdx` file you have (one per episode)
---
type: podcast-episode
slug: /your-website-path/to-this-episode
title: Hello, podcast!
subtitle: The first ever episode.
publicationDate: 2019-01-29
Expand Down Expand Up @@ -120,9 +121,6 @@ For information about the general rss feed specification, see the following:
For information about podcast-specific rss feed specifications, see the following:
* [Apple Podcasts Connect Help](https://help.apple.com/itc/podcasts_connect/#/itcb54353390)
* [Google Feed Requirements](https://developers.google.com/search/reference/podcast/rss-feed)
* [Spotify Podcast Delivery Specification](https://podcasters.spotify.com/terms/Spotify_Podcast_Delivery_Specification_v1.6.pdf)
* [Ryan Parman's iTunes Podcast RSS Spec](https://github.com/simplepie/simplepie-ng/wiki/Spec:-iTunes-Podcast-RSS)
* [FeedForAll iTunes Tags Tutorial](https://www.feedforall.com/itune-tutorial-tags.htm)

<!--
Also see https://github.com/TheCraigHewitt/Seriously-Simple-Podcasting/blob/master/templates/feed-podcast.php
-->
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-plugin-podcast-feed-mdx",
"version": "0.1.0-alpha.3",
"version": "0.1.0-alpha.4",
"description": "Gatsby plugin to generate a podcast rss feed using mdx for episodes.",
"author": "Dan Miller",
"private": false,
Expand Down
5 changes: 3 additions & 2 deletions src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ exports.onPostBuild = async ({ graphql }, pluginOptions) => {
id
frontmatter {
title
slug
subtitle
url
season
Expand All @@ -131,15 +132,15 @@ exports.onPostBuild = async ({ graphql }, pluginOptions) => {
episodes.forEach(edge => {
// gather the options
const { excerpt, id } = edge.node;
const { title, subtitle, url, season, episodeNumber, episodeType, publicationDate, author, size, duration, explicit, categories } = edge.node.frontmatter;
const { title, slug, subtitle, url, season, episodeNumber, episodeType, publicationDate, author, size, duration, explicit, categories } = edge.node.frontmatter;

// add an episode item to the feed using the options
feed.item({
guid: id,
title,
date: publicationDate,
description: excerpt,
url,
url: pluginOptions.siteUrl+slug,
categories,
author: author,
custom_elements: [
Expand Down

0 comments on commit f38003d

Please sign in to comment.