diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/feed.js | 20 | 
1 files changed, 19 insertions, 1 deletions
| diff --git a/scripts/feed.js b/scripts/feed.js index 7c394bd..c64dcb7 100644 --- a/scripts/feed.js +++ b/scripts/feed.js @@ -11,6 +11,24 @@ hexo.extend.generator.register("feed", (locals) => {      const podcast = require("podcast"); +    // Generate Podcast Categories content +    let categories = []; +    Object.keys(theme.rss.config.category).forEach((key) => { +        const category = { +            text: key, +            subcats: [] +        }; +        const subcats = theme.rss.config.category[key]; +        subcats.forEach((subcat) => { +            category.subcats.push({ +                text: subcat +            }); +        }); +        categories.push(category); +    }); + +    console.log(categories); +      // Render for site config      const feed = new podcast({          title: config.title, @@ -23,7 +41,7 @@ hexo.extend.generator.register("feed", (locals) => {          itunesSummary: config.description,          itunesAuthor: config.author,          itunesExplicit: theme.rss.config.explicit, -        itunesCategory: theme.rss.config.category, +        itunesCategory: categories,          itunesOwner: {              name: config.author,              email: theme.rss.config.email | 
