fix(git): build panic without git (#271)
This commit is contained in:
@@ -7,11 +7,12 @@
|
|||||||
<div class="post-info-mod">
|
<div class="post-info-mod">
|
||||||
<span>
|
<span>
|
||||||
{{- printf (T "lastMod") $modify_date -}}
|
{{- printf (T "lastMod") $modify_date -}}
|
||||||
{{- with .GitInfo -}}
|
{{- if .Site.Params.gitRepo -}}
|
||||||
{{- $gitHash := .Hash -}}
|
{{- with .GitInfo -}}
|
||||||
<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 }}">
|
<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 -}}
|
<i class="fas fa-hashtag fa-fw"></i>{{- .AbbreviatedHash -}}
|
||||||
</a>
|
</a>
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user