eleventy-plugin-podcaster 2.0.0-alpha.7 → 2.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/chapters.js +4 -1
- package/src/podcastFeed.js +3 -1
- package/src/podcastFeed.njk +4 -4
package/package.json
CHANGED
package/src/chapters.js
CHANGED
package/src/podcastFeed.js
CHANGED
|
@@ -47,6 +47,8 @@ export default function (eleventyConfig, options = {}) {
|
|
|
47
47
|
})
|
|
48
48
|
|
|
49
49
|
eleventyConfig.addCollection('episodePostWithChapters', (collectionApi) => {
|
|
50
|
-
return collectionApi.getAll().filter(item => isEpisodePost(item.data, options) &&
|
|
50
|
+
return collectionApi.getAll().filter(item => isEpisodePost(item.data, options) &&
|
|
51
|
+
item.data.episode?.chapters &&
|
|
52
|
+
typeof item.data.episode.chapters !== 'string')
|
|
51
53
|
})
|
|
52
54
|
}
|
package/src/podcastFeed.njk
CHANGED
|
@@ -60,11 +60,11 @@ eleventyAllowMissingExtension: true
|
|
|
60
60
|
<guid isPermaLink="true">{{ post.url | htmlBaseUrl(siteUrl) }}</guid>
|
|
61
61
|
{% endif -%}
|
|
62
62
|
<pubDate>{{ post.date | dateToRfc3339 }}</pubDate>
|
|
63
|
-
{%- if post.data.episode.chapters %}
|
|
64
|
-
<podcast:chapters url="{{
|
|
63
|
+
{%- if post.data.episode.chapters is string %}
|
|
64
|
+
<podcast:chapters url="{{ post.data.episode.chapters | htmlBaseUrl(siteUrl) }}"
|
|
65
65
|
type="application/json+chapters" />
|
|
66
|
-
{%
|
|
67
|
-
<podcast:chapters url="{{ post.
|
|
66
|
+
{% elseif post.data.episode.chapters %}
|
|
67
|
+
<podcast:chapters url="{{ [post.url, 'chapters.json'] | join('/') | htmlBaseUrl(siteUrl) }}"
|
|
68
68
|
type="application/json+chapters" />
|
|
69
69
|
{% endif -%}
|
|
70
70
|
{% if podcast.episodeDescriptionTemplate %}
|