Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lastmod not set for pages rendered as a folder #208

Closed
jayvdb opened this issue Feb 28, 2018 · 3 comments
Closed

lastmod not set for pages rendered as a folder #208

jayvdb opened this issue Feb 28, 2018 · 3 comments

Comments

@jayvdb
Copy link

jayvdb commented Feb 28, 2018

If the page permalink does not contain an extension, such as .html / :output_ext , jekyll creates a folder with an index.html inside, and jekyll-sitemap only emits a loc without a lastmod.

@jayvdb
Copy link
Author

jayvdb commented Feb 28, 2018

Actually it seems like lots of 'pages' (i.e. files with frontmatter) are not given a lastmod, and we need to use jekyll-last-modified-at.

That seems very unnecessary, and a default fallback of using the file mtime would be sufficient for most people.

@pathawks
Copy link
Member

That seems very unnecessary, and a default fallback of using the file mtime would be sufficient for most people.

The big problem here is that GitHub Pages only gets a shallow clone of the repository, so everything would have the same mtime. Any work-around is beyond the scope of this plugin, which is why we rely on jekyll-last-modified-at.

As far as not checking index.html when the permalink is a directory, that sounds like a real issue.

@jayvdb
Copy link
Author

jayvdb commented Feb 28, 2018

As far as not checking index.html when the permalink is a directory, that sounds like a real issue.

When I add jekyll-last-modified-at, the modified time is set to the appropriate value.

The big problem here is that GitHub Pages only gets a shallow clone of the repository, so everything would have the same mtime.

Yea, that is a problem with any git clone, not just shallow clones. (I checked GitLab Pages has the same). That means my "would be sufficient for most people" is likely not correct.

That said, it is core jekyll functionality to preserve mtimes. See jekyll/jekyll#3220

This will help anyone who is doing builds on Travis CI and pushing the results to a gh-pages branch (or similar). But that approach allows custom gems, so doesnt need to be solved in this core GitHub Pages gem.

So, I've raised an issue over at gjtorikian/jekyll-last-modified-at#54 .

@jayvdb jayvdb closed this as completed Feb 28, 2018
@jekyll jekyll locked and limited conversation to collaborators Apr 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants