Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: NixOS/nixos-homepage
base: 52b2a6f3fe90
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
...
head repository: NixOS/nixos-homepage
compare: c2b7827af52b
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
- 9 commits
- 4 files changed
- 2 contributors
Commits on Sep 27, 2018
-
-
Fix RSS encoding of news items
The current news-rss.xml fails http://www.feedvalidator.org for a couple of reasons, making feed readers like Liferea misparse it. This patch fixes one of those issues. As @edolstra noted in #90, HTML is not allowed directly in the RSS `<description>` tag. Instead it's supposed to be a text node, where the text can be parsed as HTML. So e.g. an `<a>` tag needs to be written in the feed as `<a>`. This could be handled more easily in an Atom feed, which allows tags from namespaces like XHTML to be embedded directly as long as the namespaces are declared properly. This could also be simpler if xsltproc supported the XPath Functions 3.0 standard, which defines a `serialize` function that does what the mode="serialize" template does in this patch.
-
Fix pubDate timestamps in news RSS feed
The current news-rss.xml fails http://www.feedvalidator.org for a couple of reasons, making feed readers like Liferea misparse it. This patch fixes one of those issues. The RSS pubDate element is required to be an RFC-822 date-time. The entries in news.xml did not conform to that specification for two reasons: a missing comma, and swapping the month and day fields. So I fixed both of those issues in news.xml, and then fixed news.xsl to extract the date substring at its new offset. This does mean that the HTML version of the news has its month and day swapped now, and frankly I liked it better in the previous month-day order. If desired the previous output can be recovered, by either continuing using the substring-pasting approach but chopping up the substrings further, or changing news.xml to use ISO 8601 date-times and using the http://exslt.org/date/ extension functions.
-
-
Fix news RSS channel properties
The channel's <link> tag should point to an HTML version of the same content as the feed, so it's better to link to /news.html than to /. In addition, the RSS specification says: "the image <title> and <link> should have the same value as the channel's <title> and <link>." http://www.rssboard.org/rss-specification#ltimagegtSubelementOfLtchannelgt Finally, feedvalidator.org says the feed document should include a link to the canonical URL for that feed: http://www.feedvalidator.org/docs/warning/MissingAtomSelfLink.html
-
The item's <link> tag should point to an HTML version of the same content as the item. However, there is no URL for each item in the current site, so there's no good place to link to. Fortunately, the link tag is not required when a description is present, so we can just drop that tag entirely. Also, each item should have some sort of unique ID in the <guid> tag. If a feed reader sees an item that's different from any item it has seen before, then the guid allows the reader to distinguish between new items and items that have been edited. http://www.feedvalidator.org/docs/warning/MissingGuid.html Since it has almost never happened that two items were posted with the same pubDate, I've chosen to use the pubDate itself as the guid. There were three duplicates, but I've made them unique by adding one second to the pubDates of the three duplicates that appear earlier in the file, so that sorting by descending pubDate would leave the file order unchanged.
-
Mark news RSS feed as "complete" per RFC5005
First, I removed the maxItem limit from the RSS feed. (It's still used for the HTML version.) The maxItem limit of 1000 was effectively infinite at the rate news items are being published, and each item is quite small so there isn't much bandwidth cost to publishing a lot of them anyway. Second, since the feed does contain every entry ever posted, it is a valid "complete feed" in the sense of RFC5005 section 2, so add the tag marking it as such. If the RSS feed ever gets too large, then RFC5005 section 4 describes how to paginate it into archived feeds.
Commits on Mar 18, 2019
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 52b2a6f3fe90...c2b7827af52b