getgrav / grav-plugin-feed

Grav Feed Plugin
https://getgrav.org
MIT License
16 stars 11 forks source link

Feed generates unmatched link tags #69

Closed reisir closed 1 year ago

reisir commented 2 years ago

user/plugins/feed/templates/feed.rss.twig

<link>{{ page.url(true) }}</link>
<atom:link href="{{ uri.rootUrl(true)~uri.uri() }}" rel="self" type="application/rss+xml"/>

results in

<link>https://example.com/feed
<link href="https://example.com/feed.rss" rel="self" type="application/rss+xml">

I even tried modifying the template, hardcoding the link tags with the right urls but still the generated .rss is missing the closing </link> tag and the atom:link turns into a <link>

This happens on both my linux server and local windows xampp server. Both also force the browser to download an .rss file instead of displaying the code like every other rss feed I've looked at. Live example at https://amv.tools/recent.rss (to clarify, I reinstalled the plugin and did not modify any templates on the live site)

And here's what the page itself looks like if there's anything wrong with the collections or something.

---
title: Recent
content:
    items:
        - "@page.children": /ae
        - "@page.children": /vegas
        - "@page.children": /opinions
    filter:
        visible: true
        published: true
limit: 5
pagination: true
visible: false
---
reisir commented 1 year ago

Seemed to be caused by a combination of not having a summary delimiters on posts and the rss template just printing raw html, not caring about closing tags. Fixed by adding summary delimiters. I think.