Jekyll feature: Retain Modified Time Stamp 02 Sep, 2011 Jekyll feature: Retain Modified Time Stamp

To ease publishing via Jekyll, I needed to push via FTP to my hosting provider. I decided to the perl utility from sourceforge: ftpsync. However, running it made me notice that Jekyll always regenerated all files and obviously, they had a 'now' timestamp. This was basically throwing off the FTPSync utility which ended up pushing the entire site, defeating the very purpose of the utility.

So, I made a two line fix that handles static pages and _posts/ as follows: The time stamp of the markdown/static page is copied to the published post page. So, even though Jekyll regenerates the entire site, the timestamps are adjusted to prevent unnecessary push via tools like FTPSync. Note that other pages will still have the 'now' timestamp.

The diff can be viewed here. Feedback/suggestions welcome in comments.

Tags  ·   jekyll  ·   feature  ·   timestamp  ·   ftpsync  ·   Show Comments ▾

Original design for Tumblr crafted by Prashanth Kamalakanthan.
Adapted for Tumblr & Jekyll by Sai Charan. Customized theme available on Github.

Sai Charan's blog by Sai Charan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Creative Commons License