-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog feed (RSS and Atom) only lists earliest posts with wrong date #1767
Comments
Looking at sorter: (a, b) => {
return compareDate(
a.data.git?.createdTime
? new Date(a.data.git?.createdTime)
: a.frontmatter.date,
b.data.git?.createdTime
? new Date(b.data.git?.createdTime)
: b.frontmatter.date,
); assuming the git data createdTime is filled, seems like the recent addition of files of older posts isn't considered. I'm also surprised by this because of what it means for the date in the filename and consequently URL. They could mismatch the used git file creation date. |
Kissaki
added a commit
to Kissaki/nushell.github.io
that referenced
this issue
Feb 1, 2025
66c8888 (nushell#1765) added old blog posts but with a current author and commit date. Blog items should be dated to their creation and publication rather than when this git source move took place. Because the feed plugin used git dates, only the 30 oldest items ended up in the feed. Falling back to front-matter date should resolve the issue. Blog posts showing up correctly dated on `/blog/` indicates that the page date is set correctly from the file name, even without explicit front matter within the post source file. Untested; please verify. Hopefully resolves nushell#1767 An alternative approach would be committing the post files individually with git commits dated back to their publication dates. But the whole git integration seems error-prone to me, so this commit seems like a better solution with less effort.
Kissaki
added a commit
to Kissaki/nushell.github.io
that referenced
this issue
Feb 1, 2025
66c8888 (nushell#1765) added old blog posts but with a current author and commit date. Blog items should be dated to their creation and publication rather than when this git source move took place. Because the feed plugin used git dates, only the 30 oldest items ended up in the feed. Falling back to front-matter date should resolve the issue. Blog posts showing up correctly dated on `/blog/` indicates that the page date is set correctly from the file name, even without explicit front matter within the post source file. Untested; please verify. Hopefully resolves nushell#1767 An alternative approach would be committing the post files individually with git commits dated back to their publication dates. But the whole git integration seems error-prone to me, so this commit seems like a better solution with less effort.
Thanks - I didn't think to check the feed after adding these. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The RSS feed and atom feed advertised at the top of the Blog page have items with a publication date that matches the last build date, making them practically unusable as feeds.
Right now, the feeds list only "This week in Nu #" 1 - 30, which are the oldest blog posts rather than listing the newest.
I suspect this is because the blog posts do not have a date defined in the front matter. Opening the source of a few of them, this seems to be the case for all blog post items, not just the "this week in Nu" posts.
I see that for example https://www.nushell.sh/blog/2025-01-30-twin0284.html does have
Posted Thursday, 2025-01-30.
. Presumably sourced fro the file name.So I have to assume the feed templates do not source from the filenames as they would have to for it to work correctly like this, without date frontmatter in the individual posts.
The text was updated successfully, but these errors were encountered: