Change git commit to view history button

This commit is contained in:
BBaoVanC 2021-11-02 00:47:59 -05:00
parent 5f40b6742b
commit 3f98073aea
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 6 additions and 8 deletions

View File

@ -27,8 +27,8 @@ params:
wordcount: true wordcount: true
readingtime: true readingtime: true
# used for last update # used for "View history"
repoURL: https://github.com/BBaoVanC/bobatheme historyURL: https://github.com/BBaoVanC/bobatheme/commits/master
privacy: privacy:
googleAnalytics: googleAnalytics:

View File

@ -43,16 +43,14 @@
</span> </span>
{{ end }} {{ end }}
{{ if .Site.Params.repoURL }} {{ with .Site.Params.historyURL }}
{{ with .GitInfo }}
<span class="post-meta-item"> <span class="post-meta-item">
{{ partial "icon.html" "branch" }} {{ partial "icon.html" "history" }}
<a href="{{ (printf "%s/blob/%s/content/%s" $.Site.Params.repoURL .Hash $.File.Path) | absURL }}" target="_blank" rel="noopener"> <a href="{{ printf "%s/content/%s" . $.File.Path }}" target="_blank" rel="noopener">
<code>{{ .AbbreviatedHash }}</code> View history
</a> </a>
</span> </span>
{{ end }} {{ end }}
{{ end }}
<div class="tags"> <div class="tags">
{{ range (.GetTerms "tags") }} {{ range (.GetTerms "tags") }}