diff options
author | Doge <[email protected]> | 2021-05-13 09:29:40 +0800 |
---|---|---|
committer | Doge <[email protected]> | 2021-05-13 09:29:40 +0800 |
commit | 073c4f91a4525f2ba38c46cb652e79752619374c (patch) | |
tree | 98c8acb79e63c35ea789fe17eddf5f3815521b00 /scripts | |
parent | 6527b2a1d77976187102a4de22d4caed44543d94 (diff) | |
download | chromate-073c4f91a4525f2ba38c46cb652e79752619374c.tar.gz chromate-073c4f91a4525f2ba38c46cb652e79752619374c.tar.bz2 chromate-073c4f91a4525f2ba38c46cb652e79752619374c.zip |
Fix podcast feed invalid description field
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/feed.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/feed.js b/scripts/feed.js index 943dd79..db38359 100644 --- a/scripts/feed.js +++ b/scripts/feed.js @@ -8,7 +8,7 @@ hexo.extend.generator.register("feed", (locals) => { const config = hexo.config; const theme = hexo.theme.config; const urler = hexo.extend.helper.get("url_for").bind(hexo); - const strip = hexo.extend.helper.get("strip_html").bind(hexo); + const hstrip = hexo.extend.helper.get("strip_html").bind(hexo); if (!theme.rss || !theme.rss.enable) return; // Render for site config @@ -30,12 +30,12 @@ hexo.extend.generator.register("feed", (locals) => { } }); - // Rendor for podcasts + // Rendering for podcasts locals.posts.sort('date', -1).each(function (post) { if (!post.podcast) return; feed.addItem({ title: post.title, - description: post.excerpt, + description: post.content, url: config.url + urler(post.path), guid: config.url + urler(post.path), author: post.podcast.authors.join(', '), @@ -48,8 +48,7 @@ hexo.extend.generator.register("feed", (locals) => { itunesAuthor: post.podcast.authors.join(', '), itunesExplicit: theme.rss.config.explicit, itunesSubtitle: post.podcast.subtitle, - itunesSummary: strip(post.excerpt), - itunesCategory: theme.rss.config.category, + itunesSummary: hstrip(post.excerpt), itunesDuration: post.podcast.duration }); }); |