Add site.feed.updated = latest_post setting - #368
Conversation
|
Boolean config options are always restrictive. What if we went with something that allowed the user to decide from one of a list of values? Like |
Primary uses cases: 1. Reduce deployment churn in repositories that hold a docsite in addition to source code. These repositories currently regenerate and find "changed" files to deploy on every commit, even when nothing in the Jekyll site was changed. The only artefact changing each time is `feed.xml`. For example: https://github.com/qunitjs/qunit/commits/gh-pages 2. Improve reproducibility of the build, as highlighted via jekyll/jekyll#7187. By offering a choice that simply eliminates use of current time entirely, we do not even have to worry about mocking it.
feed.updated_deterministic settingsite.feed.updated = latest_post setting
|
Cc @vincerubinetti and #387 |
|
That's a very good idea and I would love to have the feed's The Atom spec states (emphasis mine):
To make sure that all the other non-entry tags haven't changed since the last build, they have to be cached and compared, which at least Jekyll doesn't do. |
|
The Atom spec says
Jekyll does not follow this by default, either. Afaik feed readers don't even use this field. To detect or apply changes, HTTP semantics (Last-Modified/E-Tag, If-Modified-Since) and checksums are used. In theory, this field exists to convey to humans (not machine) after a "significant" change was made. This is subjective of course, and is rarely used in the interface of a feed reader. Part of why this is rare, might be because of site generators like Jekyll that update it constantly! This makes it no longer a useful signal. Feed readers now have their own concept of unread/new/updated to decide how/when to draw attention to a feed you have subscribed to. They might also display when they last checked a feed, which does not depend on this field either. Most feed readers also don't display the site description. And the site name is not read from the feed each time, but only once when you first create the subscription. This has the benefit of letting you find what you added, instead of the name changing automatically. I believe the following funnel is required for this to matter:
Anyway, this PR doesn't change the default. All I'm adding is the option to use |
Two main uses cases:
Reduce deployment churn in repositories that hold a docsite in
addition to source code. These currently regenerate and find
something new commit on every change, even when nothing in the
site has been changed. The only file changing each time is
feed.xml.
For example: https://github.com/qunitjs/qunit/commits/gh-pages
Improve reproducibility of the build, as highlighted via
Respect SOURCE_DATE_EPOCH environment variable (if set) over Time.now jekyll#7187,
by offering a choice that simply eliminates use of current time entirely,
not even having to mock it.