RSS Feed picking up wrong name

Hi All,

I’ve noticed when people subscribe to my blog/website the RSS feed is picking up the title of “Home” rather than my website name (which should be Techielass blog), I’m not sure where the issue lies.

www.techielass.com

Does anyone have any suggestions?

Thanks,
Sarah

1 Like

Hi @techielass, I presume you are using the plugin “feed”?

Looking at the source code at Github, the title is always the title of the page on which the plugin in placed. This is the Twig the plugin uses:

<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>{{ page.title }}</title>

When I test it on a fresh Quark blog skeleton, it does indeed use the title of the page. And if the title is not set in the header of the page, it uses the folder name as fallback.

Your site has the title set as <title>Techie Lass Blog</title>. Which is definitely not “Home”. So the title of the generated HTML code looks OK.

Hum… That makes me wonder what the value is of the property “title” of the page object (page.title), or whether the page.title is used at all…

Did you perhaps set the title hard-coded in the Twig template of your theme instead of the pages header? If so, would you mind trying to set the title in the “blog.md”, like:

title: Techie Lass Blog
...

Hope this helps…

By the way, there is a feature request at github to add an option to set a specific title for the feed.

Please add your +1 or thumbs up or supporting comment or whatever to this issue. (edit: the Github one)

1 Like

Thanks, unfortunately setting the title in blog.md didn’t help. :frowning:

Found a solution, hard coded the title in the feed.atom.twig and feed.rss.twig files, which isn’t ideal but is a temporary solution right now. :slight_smile:

@techielass, I presume you meant you:

  • Copied templates ‘/user/plugins/feed/templates/(atom|feed).rss.twig’ to ‘/user/themes/my-inherited-theme/templates’
  • And hard-coded the title in the copies? :wink:

By the way, I have tried all sorts of tricks to reproduce your issue, but all failed…

However…, I did notice something suspicious on your site: The url of your rss feed is https://www.techielass.com/.rss. You are missing a name in front of ‘.rss’.
(NB. Same happens for atom)

In ‘/user/themes/antimatter/templates/partials/sidebar.html.twig’, the url is set as follows:

<a class="button" href="{{ feed_url }}.rss"><i class="fa fa-rss-square"></i> RSS</a>

Looking at the url of your rss feed, it seems that ‘feed_url’ is either an empty string, or ‘/’, or null. The following code is used to set ‘feed_url’:

{% set feed_url = blog.url == '/' or blog.url == base_url_relative ? (base_url_relative~'/'~blog.slug) : blog.url %}

The value of ‘feed_url’ is based on ‘blog.slug’ (when blog is home page) or ‘blog.url’.

The only way I could force the url of the rss feed to be like ‘/.rss’, is when the ‘blog’ object is not passed to ‘partials/sidebar.html.twig’ in ‘/user/themes/antimatter/templates/blog/html.twig’:

# page is not assigned to 'blog'
{% include 'partials/sidebar.html.twig' %} 

# orginal code: page is assigned to 'blog'
{% include 'partials/sidebar.html.twig' with {'blog':page} %}

You may want to have a look at that.

Anyway… the above issue does not have any effect on the <title> of the rss feed… It might be a smell of other “temporary solutions” being applied though… :slight_smile:

Last point:
You might want to have a look at your settings of the Asset Manager which can minify and bundle css and js files. This may improve performance by reducing the amount of bytes transferred and the amount of calls to the server.