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
readingtime: true
# used for last update
repoURL: https://github.com/BBaoVanC/bobatheme
# used for "View history"
historyURL: https://github.com/BBaoVanC/bobatheme/commits/master
privacy:
googleAnalytics:

View File

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