Most html files are generated and we know their dates:$ hg log --limit 1 --template '{date|date}' include/petscsnes.h Mon Mar 19 22:42:51 2012 -0500 Similarly for inserting the date-string into the non-generated pages.