I am using Pelican 3.3 and I have an almost static file index.html
in my jinja2 templates. I would like to display the date of the last modification of the file within it.
I found quite easily that article.locale_date
and page.locale_date
are doing the job for articles and pages (with DEFAULT_DATE = 'fs'
). But, I cannot figure out how to do this for a template file.
I found some suggestions about using a Python function through other Python modules such as Flask
or Environment
. But, is there a simpler way to get the date of last modification of a template file ?