tlienart / Franklin.jl

(yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.
https://franklinjl.org
MIT License
963 stars 113 forks source link

Tag feed's link and atom:link point to the global ones #1042

Open McSinyx opened 1 year ago

McSinyx commented 1 year ago

For example, /tag/recipe/feed.xml should have the canonical link of /tag/recipe and atom:link pointing to self.

tlienart commented 1 year ago

So what happens here is that the general RSS feed takes _rss/head.xml and _rss/item.xml to build the feed.

In the default _rss/head.xml there's:

(...)
    <link> {{website_url}} </link>
(...)
    <atom:link
      href="{{fd_rss_feed_url}}"
      rel="self"
      type="application/rss+xml" />

and this is used for the per-tag RSS as well unless a specific tag head is given.

In the per-tag level, if no custom head tag is provided, we should adjust the insertion of {{website_url}} and {{fd_rss_feed_url}} to have /tag/tagname attached to it.

I'll try to get a fix in soon.