Hacker News new | past | comments | ask | show | jobs | submit login

Ah, 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



The appropriate way is to use the xml:base attribute, as demonstrated in the example at https://datatracker.ietf.org/doc/html/rfc4287#page-4.


Thanks! I'll look at that.


> (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>


Excellent! 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

Thanks for the pointers!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: