Closed drmathias closed 4 years ago
Ahh - I see the problem. The feed item ID is expecting a Uri
and since the style of item ID in your front matter can't be parsed as one it's just returning null. This changed/regressed as part of a fix to pass better data to the underlying GeenrateFeeds
module.
I'd be curious what you were ending up with before. The RSS/Atom library has always used URIs so somewhere along the way it must have gotten converted to one.
My first instinct is that I should change the underlying RSS/Atom library in Statiq.Feeds (which I forked from somewhere else) to use a string instead of a URI. That ID value actually maps to the RSS GUID, which appears to be a string according to the best specification data I could find: https://cyber.harvard.edu/rss/rss.html#ltguidgtSubelementOfLtitemgt
Any thoughts on that?
After just a bit more digging I guess the theory was that the unique link to a feed item was that item's ID, but I think you've just shown that's not a great universal strategy and we should allow alternate non-URI IDs too.
Can't seem to find the change that was made, though using Uri
should work fine with tag URIs. However I think you're right in saying it would be better to use a string
, as it adheres to the RSS & Atom specs better. Sometimes GUID/UUIDs are used as item IDs and using Uri
wouldn't work for those.
This should be fixed and will go out with the next release.
When updating from Statiq.Web 1.0.0-alpha.14 to a newer release, an exception is thrown during the build, if FeedItemId is defined in the feed file.
feed.yml
Exception:
It appears that instead of being set to the value specified in the feed file, the feed entry IDs are being set to null, causing the module to throw an exception. However if not defined, the feed entry IDs are set to the default generated value.
Version 1.0.0-alpha.14 and lower does not have this issue and the feed gets generated as expected.