SOLVED RSS feed sorting by Date broken in 0.19


#1

Hi,

I have a page with sections of “normal web pages” - these are sorted by weight to get the appropriate page order in the menu.
Then there is a blog section which is naturally is sorted by reverse date.

I create a site wide RSS feed like the following:

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
    <link>{{ .Permalink }}</link>
    <description>Custom Template - Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
    <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
    <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
    <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
    <atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
    {{ range first 15 .Data.Pages.ByDate.Reverse }}
    <item>
      <title>{{ .Title }}</title>
      <link>{{ .Permalink }}</link>
      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
      <guid>{{ .Permalink }}</guid>
      <description>{{ .Summary | html }}</description>
    </item>
    {{ end }}
  </channel>
</rss>

but this does not show up any new articles from the blog but only the weighted pages from the other sections.
What’s going wrong?
V0.19
https://github.com/ominty/ominty-hugoissues/tree/rss-sorting


#2

@bep: I think this is a bug since it is a regression from V0.18.1 to V0.19
Everything is fine again when I go back to previous version.


#3

Sure, that may be true, but we don’t handle bugs here in the discussion forum. It is “something else” until it is registered as an issue and labeled as a bug on https://github.com/spf13/hugo/issues – so, my point about renaming the “bug” category here (I could not delete it) was to make a point of that. People register “bugs” here and expect us to fix it. I don’t. I may pick up on that thread and see, yea, we need to fix that, and register an issue on GitHub, but until that happens, it is a “question”.


#4

I understand your point and it was not my goal to trigger bugfixing form here.

I thought the purpose of the “bug” section of this forum is to report potential bugs and discuss them among users to see if they are reproducable BEFORE filing an issue in github and thus create workload for the devs (and no, I don’t expect tasks to be filtered out of a discussion forum).

Perhaps this my goal wasn’t expressed clear enough in my question (sorry, I’m not a native English speaker) – or I misunderstood the purpose of that bug section of the forum.


#5

Issue 3145 https://github.com/spf13/hugo/issues/3145