Get RSS pubDate
from mtimes
#517
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #507
Taking the idea from @stefmolin , here we get the
pubDate
from the mtime of the file. In CI we restore those from the commit history.There is a minor bit of semantic mismatch between the RSS feed/RSS spec and what we might want for the site - the RSS field is
pubDate
, or the date that the item was published. I don't think the spec is prescriptive about what that means, e.g. updating a file could be re-publishing it (that's how we treat it here). Usually it's good to treat the original publication date and the update date separately when displaying: e.g. "Originally published: 2020-01-01, updated: 2025-06-04" since both of those are independently meaningful for a reader. Currently we don't display the date on the site, but i renamed the parameter todate_updated
in case we want to add that in the future.You'll notice that all the dates for the tutorials are shortly before right now, since that's the last time they were changed (to remove the dates). That may or may not be desirable... so i also made it possible to explicitly assign those dates if we wanted to backdate the existing tutorials, for example.