You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
I have several pages in my site, whose content is generated based on YAML data in _data, or which display the items of a collection. Currently, only changes to the page source itself are reflected by page.last_modified_at. I would like page.last_modified_at to reflect when the page content changes due to changes in the underlying data / collection (such that the jekyll-sitemap plugin generates correct <lastmod> tags).
Is this feature currently supported, or planned?
If it's not yet supported, I would be willing to take a look into this issue myself, if you could give me some guidance.
A relatively simple solution might be to have users explicitly declare dependencies in the frontmatter. I'd be happy with this solution, but others may find it tedious. On the other hand, it gives you complete control over which dependencies you want to be considered, and which should be ignored.
---
lastmod_dependencies:
collections: ['people'] # names of collectionsdata: ['bla'] # names of files in `_data`, not including the .yml extension
---
The second variant (using jekyll's dependency tracking) seems a bit farther off, after some investigation:
Dependency tracking is only enabled for incremental builds (that is the only application so far)
Dependencies on data files are currently not tracked:
Based on some experimentation, it seems dependencies on documents in collections are also currently untracked.
Fundamentally, if dependencies are only discovered during rendering, the last_modified_at time of the current page can not easily be determined (though it'd probably be fine for my use case, i.e., <lastmod> in the sitemap)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have several pages in my site, whose content is generated based on YAML data in
_data
, or which display the items of a collection. Currently, only changes to the page source itself are reflected bypage.last_modified_at
. I would likepage.last_modified_at
to reflect when the page content changes due to changes in the underlying data / collection (such that thejekyll-sitemap
plugin generates correct<lastmod>
tags).Is this feature currently supported, or planned?
If it's not yet supported, I would be willing to take a look into this issue myself, if you could give me some guidance.
I don't know how difficult it would be to access this information from a plugin.
The text was updated successfully, but these errors were encountered: