The custom rss doesn't work

I want to create a podcast rss, and I did as this url shows: https://ghost.org/tutorials/custom-rss-feed/

In routes.yaml

routes:

/podcast/rss/:
  template: podcast/rss
  content_type: text/xml

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tag:-podcast
  /podcast/:
    permalink: /podcast/{slug}/
    filter: tag:podcast

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

and I created a folder called podcast, and there’s a file called rss.hbs with content

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
    xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0">

<channel>
<title>{{@blog.title}}</title>
<link>{{@blog.url}}</link>
<description>{{@blog.description}}</description>
<language>{{lang}}</language>
<copyright>{{@blog.title}} Copyright {{date format="YYYY"}}</copyright>
<atom:link href="{{@blog.url}}/podcast/rss/" rel="self" type="application/rss+xml" />
<lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
<itunes:author>{{@blog.title}}</itunes:author>
<itunes:summary>{{@blog.description}}</itunes:summary>
<itunes:owner>
    <itunes:name>Your Name</itunes:name>
    <itunes:email>youremail@example.com</itunes:email>
</itunes:owner>
<itunes:explicit>clean</itunes:explicit>
<itunes:image href="{{img_url @blog.icon absolute="true"}}"/>
<itunes:category text="Technology"></itunes:category>

{{#get "posts" filter="tag:podcast" include="tags,authors" as |episode|}}
    {{#foreach episode}}
    <item>
        <title>{{title}}</title>
        <link>{{url absolute="true"}}</link>
        <pubDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</pubDate>
        <guid isPermaLink="false">{{id}}</guid>
        <category><![CDATA[ {{primary_tag}} ]]></category>
        <description>{{custom_excerpt}}</description>
        <content:encoded><![CDATA[ {{content}} ]]></content:encoded>
        <enclosure url="{{og_description}}" length="0" type="audio/mpeg"/>
        <itunes:subtitle>{{custom_excerpt}}</itunes:subtitle>
        <itunes:summary><![CDATA[ {{content}} ]]></itunes:summary>
    </item>
    {{/foreach}}
{{/get}}

</channel>
</rss>

but the url domain.com/podcast/rss still shows the rss content without the rss template? How can I fix this?

Hi there :wave:. I think it might be how you’ve named the template, you’ve set the value to podcast/rss so you’ll need to put the rss.hbs template into a podcast folder within your theme. Either that or change the value to just rss :slightly_smiling_face:

@DavidDarnes Of course, I put the rss.hbs template into a podcast folder within my theme, and I also tried the way of changing the value to just rss, none of them works.

BTW. there’s a typo in your reply, postcast should be podcast, right?

Fixed :slight_smile:

I saw https://github.com/TryGhost/Ghost/issues/11251#issuecomment-543533573
Nice one, but those types of questions are best asked here so others can benefit :slightly_smiling_face:

Yea I made a typo with podcast, fixed it. Thanks!