4 ms·
I wish there's a snippet of what the XML looks like, even better if it's "rendered"...
by bellyfullofbac 5y ago
I wish there's a snippet of what the XML looks like, even better if it's "rendered"...
- Vinnl 5y agoThat's a good one, I'll see if I can add something to the site. Meanwhile you can see the generated examples here: - https://vincenttunru.gitlab.io/feeds/funfacts.xml https://vincenttunru.gitlab.io/feeds/funfacts.xml - https://vincenttunru.gitlab.io/feeds/wikivoyage.xml https://vincenttunru.gitlab.io/feeds/wikivoyage.xml And the combined feed: - https://vincenttunru.gitlab.io/feeds/all.xml https://vincenttunru.gitlab.io/feeds/all.xml Add those links to your feed reader to see rendered examples while I update the site. Edit: preview added to the website.
- moehm 5y agoFYI, the links inside your feeds don't work, because they are relative, not absolute.
- Vinnl 5y agoAh, you mean the ones inside the contents? That's a good one. I'm not sure if that's easily fixable, but I'll give it some thought. For those interested, I'll track it here: https://gitlab.com/vincenttunru/feed-me-up-scotty/-/issues/1 https://gitlab.com/vincenttunru/feed-me-up-scotty/-/issues/1
- chrismorgan 5y agoThe appropriate way is to use the xml:base attribute, as demonstrated in the example at https://datatracker.ietf.org/doc/html/rfc4287#page-4 https://datatracker.ietf.org/doc/html/rfc4287#page-4.
- Vinnl 5y agoThanks! I'll look at that.
- chrismorgan 5y ago> (Of course, for the combined feed this would be problematic.) Not so; unlike the HTML <base> element which applies to a document, the xml:base attribute is applied to an element and its descendants. The typical pattern (as shown in the RFC 4287 example) is to put it on each entry’s <content>. In your markup, you’ll end up with each entry having its URL in three places: <id>http://example.com/item</id> <link href="http://example.com/item"/> <content type="html" xml:base="http://example.com/item">…</content>
- Vinnl 5y agoExcellent! I'll look into actually implementing this before making further comments, since I'm sure I'll find out such things as I do :P Edit: the package I'm using to generate the feeds does not support that attribute yet, so it'll have to wait a bit for my PR to hopefully be accepted: https://github.com/jpmonette/feed/pull/158 https://github.com/jpmonette/feed/pull/158 Thanks for the pointers!