diff --git a/config.toml b/config.toml index 8f867aa..b419453 100644 --- a/config.toml +++ b/config.toml @@ -6,6 +6,8 @@ disqusShortname = "" googleAnalytics = "UA-122825031-1" publishDir = "docs" enableEmoji = true +# for .Lastmod to work with .GitInfo: --enableGitInfo https://gohugo.io/variables/git/ +enableGitInfo = true [Author] name = "Wouter Groeneveld" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 279fa9d..29ac8a6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -74,13 +74,15 @@ "copyrightHolder" : "{{ .Site.Author.name }}", "copyrightYear" : "{{ .Date.Format "2006" }}", "datePublished": "{{ .Date }}", - "dateModified" : "{{ .Date }}", + "dateModified" : "{{ .Lastmod }}", "url" : "{{ .Permalink }}", "wordCount" : "{{ .WordCount }}", {{ if .Keywords }} "keywords" : [ {{ range .Keywords }}"{{ . }}",{{ end }}"{{ .Title }}" ] {{ else if .Params.tags }} "keywords" : [ {{ if isset .Params "tags" }}{{ range .Params.tags }}"{{ . }}",{{ end }}{{ end }}"{{ .Title }}" ] + {{ else }} + "keywords": [ "{{ .Title }}" ] {{ end }} }