diff options
author | Gimo <self@gimo.me> | 2019-02-14 21:26:50 +0900 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2019-02-14 20:26:50 +0800 |
commit | 920e2eb84bb874a9e48062b1bf4032c8b9c4141a (patch) | |
tree | c330b510b25fa0051373d179c1f9bcf92715d4a9 /layouts/partials/post/copyright.html | |
parent | 915174fdbaf728b2aa5edb05bdd842cd82670e02 (diff) |
feat(lastmod): use git commit to generate lastmod info (#124)
Diffstat (limited to 'layouts/partials/post/copyright.html')
-rw-r--r-- | layouts/partials/post/copyright.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/layouts/partials/post/copyright.html b/layouts/partials/post/copyright.html index cd42d68..35a7609 100644 --- a/layouts/partials/post/copyright.html +++ b/layouts/partials/post/copyright.html @@ -6,7 +6,10 @@ </p> <p class="copyright-item"> <span class="item-title">{{ T "lastMod" }}</span> - <span class="item-content">{{ .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}</span> + <span class="item-content"> + {{ .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} + {{ with .GitInfo }}<a href="{{ $.Site.Params.gitRepo }}/commit/{{ .Hash }}" title="{{ .Subject }}">({{ .AbbreviatedHash }})</a>{{ end }} + </span> </p> {{ if $.Site.Params.linkToMarkDown -}} {{ with $.OutputFormats.Get "markdown" -}} @@ -29,4 +32,4 @@ </p> {{- end }} </div> -{{- end }}
\ No newline at end of file +{{- end }} |