Limit words in RSS Feed

  • What’s your URL?
    I’m testing in Localhost
  • What version of Ghost are you using?
    Ghost-CLI version: 1.17.3
    Ghost version: 4.8.4
  • Theme Used: Casper

I’m trying Custom RSS feature. I have created a file called rss.hbs under my theme folder. I’m using Casper. So it’s under /content/themes/casper/rss.hbs

I’m trying to limit the Content (Word Count). Right now, It’s showing the whole content in rss feed.

This is the Code I’m using in rss.hbs file

<rss xmlns:dc="" xmlns:content="" xmlns:atom="" xmlns:media="" version="2.0">
<title><![CDATA[ {{@site.title}} ]]></title>
<description><![CDATA[ {{@site.description}} ]]></description>
<lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
<atom:link href="{{@site.url}}" rel="self" type="application/rss+xml"/>

{{#get "posts" limit="all" include="authors,tags"}}
    {{#foreach posts}}
        <title><![CDATA[ {{title}} ]]></title>
        <description><![CDATA[ {{excerpt}} ]]></description>
        <link>{{url absolute="true"}}</link>
        <guid isPermaLink="false">{{id}}</guid>
        <category><![CDATA[ {{}} ]]></category>
        <dc:creator><![CDATA[ {{}} ]]></dc:creator>
        <pubDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</pubDate>
        <media:content url="{{feature_image}}" medium="image"/>
        <content:encoded><![CDATA[ {{excerpt}}<p>&nbsp;</p><p><a href="{{url absolute="true"}}">Continue Reading..</a></p> ]]></content:encoded>


As per Documentation I have created a routes.yaml file


    permalink: /{slug}/
    template: index
    permalink: /rss/
    template: rss
    content_type: text/xml

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

But it’s still /rss is still showing whole post.

I have already created a post Limit RSS feed post word count long back, But the solution isn’t working.

Any Input on this?