mirror of
https://github.com/getzola/zola
synced 2024-12-13 13:52:28 +00:00
63054a96d2
Relative links in the entry content do not currently have a base URI, so will be resolved relative to the feed URI: Given an entry with the content: <a href="some-resource.bin"> And URIS of: * entry: https://example.org/blog/some-entry/ * feed: https://example.org/atom.xml The link URI will end up as: https://example.org/some-resource.bin rather than the URI that ends up resolved in the rendered page: https://example.org/blog/some-entry/some-resource.bin The atom and RSS formats allow for an xml:base attribute (itself specified in [1]) to provide a base URI of a subset of a document. This change adds xml:base attributes to each entry, using the page permalink. This gives us something equivalent to: <entry> <content xml:base="https://example.org/blog/some-entry/"> <![CDATA[ <a href="some-resource.bin"> ]]> </content> </entry> [1]: https://www.w3.org/TR/xmlbase/ Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> |
||
---|---|---|
.. | ||
config | ||
console | ||
content | ||
errors | ||
imageproc | ||
libs | ||
link_checker | ||
markdown | ||
search | ||
site | ||
templates | ||
utils |