Closed pathawks closed 9 years ago
The modified time should be used if and only if information cannot be ascertained from the Git repo on when it was committed. Are you using the plugin in a Git repo?
Are you using the plugin in a Git repo?
Yup.
Here is what I am looking at: https://travis-ci.org/jekyll/jekyll-sitemap/jobs/47481786
http://example.org/jekyll-last-modified-at/static-file.html
was created in the same commit as http://example.org/2015/01/18/jekyll-last-modified-at.html
and http://example.org/jekyll-last-modified-at/page.html
, but the latter two display the date they were committed while the former displays the file system modified date (which will always be different on Travis).
It looks like jekyll-last-modified-at/static-file.html does not have frontmatter associated with it, whereas the other two do. I wonder if that would affect things here. /cc @parkr Any thoughts here?
Right; it is a static file, rather than a page. Jekyll treats them differently.
Static files unfortunately do not have any of these same attributes. It would make sense to add a data
Hash which is then used in to_liquid
, but at the moment, that has not been implemented. :(
My mistake, jekyll-last-modified-at ignores static files completely; it does not get the file system modified time.
It seems that this is the expected behavior, barring #34
Mea culpa.
It seems that, for pages and posts, the modified time is when they were committed to the Git repo.
Unless I am misunderstanding somethinh, it seems that for static files the modified time is what the file system has stored rather than when it was committed to the repo. Is there a reason for this?
Have I done something wrong? (Quite likely)