There is also a flexible new “dates in frontmatter” config that @kaushalmodi has promised to get documented Git is one of the options, but you could also configure Hugo to use the file lastmod timestamp … That is, however, not very accurate if pull from Git all the time.
Maybe the default configuration lastmod = [":git" "lastmod", "date","publishDate"] is nearly what I want.
I added enableGitInfo = true in the config file and deleted the lastmod value in the content file front matter.
The format result is 2018-04-21 09:44 based on the git author date Sat, Apr 21, 2018, 9:30 AM using {{ .Lastmod.Format "2006-01-02 15:11" }}.
The git author date seem not to be fetched timely by Hugo every time I commit the content file on development. Because after I commit the file several time the lastmod keeps value with 2018-04-21 09:44
After I rebuild the site, the lastmod vaule finally update to 2018-04-21 10:44 based on the git author date Sat, Apr 21, 2018, 10:07 AM. Obviously the time does not match. I doubt that whether the format 2006-01-02 15:11 is really works as expected.