From 503a9a3934c2515a17c88a4fc28d6d93514c6ad9 Mon Sep 17 00:00:00 2001 From: Track3 Date: Sat, 19 Jan 2019 12:15:54 +0800 Subject: [PATCH] Show "commit detail" link only when `gitUrl` is set * See #34 --- layouts/posts/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 5b9e8e0..e4fc4e4 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -37,7 +37,7 @@ {{- end }}

{{ i18n "wordCount" . }}

{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}

- {{- if .GitInfo }} + {{- if and .GitInfo .Site.Params.gitUrl }}

{{ .GitInfo.AbbreviatedHash }} @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}

{{- end }}