Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Feed plugin and autodiscover

Solved by pamtbaau View solution

Started by David Meissner 10 months ago · 2 replies · 840 views
10 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?

10 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 DrPen, 2 days ago
1 65 3 hours ago
Plugins · by renedebaaij, 1 week ago
1 134 3 days ago
Plugins · by Thomas, 6 days ago
1 143 5 days ago
Plugins · by complanar, 4 weeks ago
6 470 3 weeks ago
Plugins · by BenLaKnet, 3 weeks ago
1 294 3 weeks ago