Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(git): build panic without git (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Apr 27, 2020
1 parent 9003e18 commit d5bc3be
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions layouts/partials/single/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
<div class="post-info-mod">
<span>
{{- printf (T "lastMod") $modify_date -}}
{{- with .GitInfo -}}
{{- $gitHash := .Hash -}}
&nbsp;<a class="git-hash" {{ with $.Site.Params.gitRepo }}href="{{ printf `%s/commit/%s` . $gitHash }}" target="_blank"{{ else }}href="javascript:void(0);"{{ end }} title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ $gitHash }}: {{ .Subject }}">
<i class="fas fa-hashtag fa-fw"></i>{{- .AbbreviatedHash -}}
</a>
{{- if .Site.Params.gitRepo -}}
{{- with .GitInfo -}}
&nbsp;<a class="git-hash" href="{{ printf `%s/commit/%s` $.Site.Params.gitRepo .Hash }}" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
<i class="fas fa-hashtag fa-fw"></i>{{- .AbbreviatedHash -}}
</a>
{{- end -}}
{{- end -}}
</span>
</div>
Expand Down

0 comments on commit d5bc3be

Please sign in to comment.