diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 9d7c5b9..ffa828e 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -47,14 +47,14 @@ {{- end }}
{{- partial "svg.html" (dict "context" . "name" "posts_single_wordcount") }}{{ i18n "wordCount" . -}} {{- partial "readTime.html" . -}}
{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local -}} - {{- if or (eq .Page.Params.IgnoreLastmod nil) (not .Page.Params.IgnoreLastmod) -}} - {{- if and .GitInfo .Site.Params.gitUrl -}} - [{{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}{{ .GitInfo.AbbreviatedHash -}} @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local -}}] - {{- else if not (eq .Lastmod .Date ) -}} - [Modified : {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local -}}] - {{- else -}} - {{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }} - {{- end -}} + {{- if and (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) -}} + {{- if and .GitInfo .Site.Params.gitUrl -}} + [{{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}{{ .GitInfo.AbbreviatedHash -}} @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local -}}] + {{- else if not (eq .Lastmod .Date ) -}} + [Modified : {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local -}}] + {{- else -}} + {{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }} + {{- end -}} {{- end -}}