Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Feed plugin and autodiscover

Solved by pamtbaau View solution

Started by David Meissner 6 months ago · 2 replies · 255 views
6 months ago

I have modified base.html.twig to add an autodiscover link for my RSS feed, per the instructions in the plugin documentation. The instructions say to add the line:

link rel="alternate" type="application/rss+xml" title="My Feed" href="{{ base_url }}.rss"

When I do this, base_url is not expanded into anything; the resulting link in the head section is href=”.rss”, instead of blog.rss as expected.

Where am I going wrong?

6 months ago Solution

@dmeissner, It depends on where your blog resides. The example given by the Feed plugin, does not apply to all site configs.

If your blog is the home page, it should be fine. If the url to your blog is not the home page but eg. https://mydomain/blog, then the \<link> should have the path to your blog appended e.g. : href="{{ base_url }}/blog.rss"

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Slebeig, 5 days ago
1 102 5 days ago
Plugins · by Rene, 4 weeks ago
2 302 4 weeks ago
Plugins · by Xavier, 2 months ago
2 222 1 month ago
Plugins · by Luka Prinčič, 7 years ago
3 1410 2 months ago
Plugins · by Sebastian van de Meer, 2 months ago
1 322 2 months ago