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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Feed plugin and autodiscover

Solved by pamtbaau View solution

Started by David Meissner 6 months ago · 2 replies · 85 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 Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 72 2 months ago