Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Feed plugin and autodiscover

Solved by pamtbaau View solution

Started by David Meissner 10 months ago · 2 replies · 963 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, 3 weeks ago
2 288 3 weeks ago
Plugins · by renedebaaij, 4 weeks ago
1 263 3 weeks ago
Plugins · by Thomas, 4 weeks ago
1 279 4 weeks ago
Plugins · by complanar, 2 months ago
6 600 1 month ago
Plugins · by BenLaKnet, 1 month ago
1 503 1 month ago