Fix feeds href everywhere
Per https://docs.getpelican.com/en/stable/settings.html#feed-settings: FEED_DOMAIN = None, i.e. base URL is "/" The domain prepended to feed URLs. Since feed URLs should always be absolute, it is highly recommended to define this (e.g., “https://feeds.example.com”). If you have already explicitly defined SITEURL (see above) and want to use the same domain for your feeds, you can just set: FEED_DOMAIN = SITEURL. Using `href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}"` in the template seems to be the right way to do things, by looking at other themes, eg the default theme in Pelican itself: https://github.com/getpelican/pelican/blob/master/pelican/themes/simple/templates/base.html Obviously, this change might break things for some users of the theme. If someone used to have this definition in `publishconf.py`: FEED_ALL_ATOM = SITEURL + '/feeds/all.atom.xml' Then they should update to: FEED_DOMAIN = SITEURL FEED_ALL_ATOM = 'feeds/all.atom.xml'
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<a class="sidebar-nav-item" href="{{ FEED_ALL_ATOM }}">
|
||||
<a class="sidebar-nav-item" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">
|
||||
<i class="fas fa-rss"></i>
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user