zzossig / hugo-theme-zzo

Make a blog with hugo zzo theme!
https://themes.gohugo.io//theme/hugo-theme-zzo/en/
MIT License
737 stars 257 forks source link

Possible enhancements in RSS feed #179

Closed szpak closed 4 years ago

szpak commented 4 years ago

Hello again. After a hiatus during weekend to think about the things I am back with some RSS-related enhancements proposals :).

I subscribed to my new test blog from TinyTinyRSS and in comparison to the feed from Wordpress which hosts the current version of my blog there are some XML elements which could be added:

At the whole feed level there could be added update related fields (https://www.feedforall.com/syndication.htm), for example:

<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>

Btw, Wordpress uses <![CDATA[ for the post description. I don't know if you quote it on your own, to do not break XML in specific cases.

zzossig commented 4 years ago

Hello! Ok, I'll make it soon.

Btw, Wordpress uses <![CDATA[ for the post description. I don't know if you quote it on your own, to do not break XML in specific cases.

I think the link (https://solidsoft.wordpress.com/feed/) generates text so it maybe needs to do some escape for making it xml in the future. But, Hugo generate xml right away for us. So we don't need to use escape syntax. -> we may need the escape syntax https://discourse.gohugo.io/t/full-text-rss-feed/8368/3?u=zzo

zzossig commented 4 years ago

I added all of them

params.toml

...
updatePeriod = "" # Possible values: 'hourly', 'daily', 'weekly', 'monthly', or 'yearly'.
updateFrequency = ""
fullContents = false
szpak commented 4 years ago

Thanks! It works fine, but my feed reader seems to expect <dc:creator> at the post level, not the whole feed (and it ignores it). Could it be changed?

In addition it might to good to add namespace description do <dc: (and along the way also for others) in the leading rss tag, e.g.

<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
        xmlns:media="http://search.yahoo.com/mrss/">
szpak commented 4 years ago

Btw, atom feeds allow to define also an updated field (at the entry level). It would be nice to put it if lastmod is used in the blog post - to inform feeders that there was some change in the content.

Sample usage in the RSS 2.0 feed:

<atom:modified>2004-06-20T23:30:45Z</atom:modified>

http://grumet.net/weblog/archives/rss-with-atom-example.html

zzossig commented 4 years ago

I added them all. I think all is working now. Maybe?

szpak commented 4 years ago

It is, thanks!