Hugo has lastmod now, so, you might use that.
Also, you might be able to adapt this concept:
… for stuff it does not have like, getting commit counts.