Preserve mtimes when building site
spanezz opened this issue · comments
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.
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.