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

Preserve mtimes when building site #23

Open
spanezz opened this issue Dec 15, 2019 · 1 comment
Open

Preserve mtimes when building site #23

spanezz opened this issue Dec 15, 2019 · 1 comment

Comments

@spanezz
Copy link
Owner

spanezz commented Dec 15, 2019

When writing rendered pages and assets to the destination directory during build, if staticsite has a mtime for the rendered content (like an assed source image mtime, or the most recent date for a page in a syndication), the resulting file mtimes could be set to match it.

This allows a web browser to handle correctly, for example, If-Modified-Since headers from webbrowser, and to more aggressively skip rewriting pages that didn't change since the last site build.

@spanezz
Copy link
Owner Author

spanezz commented Dec 15, 2019

Note that, for a syndication, the date of the syndication fits the highest date of its pages, but its mtime should be the highest mtime of its pages. For example, if a typo is corrected in a page, the syndication date should not change, but the page contents inside the syndication should get corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant