Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xianmin/hugo-theme-jane.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong-Siang Shih <shaform@gmail.com>2019-07-19 15:34:28 +0300
committerChen Xianmin <xianmin12@gmail.com>2019-07-19 15:34:28 +0300
commit2666d94d46c1f2e690aacefe51e81b13d07500c6 (patch)
tree8bc7710c9483a5bf1d80da92e96bf5fb54021ec4
parent8c66d34044c5e3d0b0554c10ac91c55114e2dec6 (diff)
display commit link only when repo url is set (#210)
-rw-r--r--layouts/partials/post/copyright.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/partials/post/copyright.html b/layouts/partials/post/copyright.html
index 25758e0..75ca346 100644
--- a/layouts/partials/post/copyright.html
+++ b/layouts/partials/post/copyright.html
@@ -19,9 +19,11 @@
<span class="item-content">
{{ .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
{{ with .GitInfo }}
+ {{ if $.Site.Params.gitInfo.gitRepo -}}
<a href="{{ $.Site.Params.gitInfo.gitRepo }}/commit/{{ .Hash }}" title="{{ .Subject }}">
({{ .AbbreviatedHash }})
</a>
+ {{- end }}
{{ if $.Site.Params.gitInfo.showCommitMessage }}
<br>{{ .Subject }}
{{ end }}