Short version: is it possible to have a page’s last modified date show the last modified date of a datafile that it is build from?
I have a page (call it lecture-materials.md) that is mainly built by a shortcode that accesses a data file. When the data file is updated, the page is recreated.
However: the “last modified” date for the page is the last modified of the markdown of the page, not the data file. The markdown page never gets modified, so the date shows when the site was set up - not when the data was last changed.
You can see this at:
Note how the last modified date is the beginning of the semester, even though things were added recently (to the data file).
Of course, I could do this manually (edit the page markdown each time the data file changes), but I was wondering if there was a more elegant way to do this. Generally, the last modified is correctly updated for everything else (except for the few pages that are mainly created from data).
Is there a way to get a lastmod for a data file? (right now, I use .Page.Lastmod - is there an equivalent .Site.Data.toml_file lastmod check?)
Is there a way to say “this pages last modified date is the later of this file’s date and the data files date?” (given #1, I could do this for display in my footer, but it would be nice if it was used correctly for the “recently changed” widget)