Improve viewsource meta item

This commit is contained in:
BBaoVanC 2021-11-15 21:03:07 -06:00
parent 8f36ba7368
commit 37c5a970c4
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A

View File

@ -1,12 +1,12 @@
{{ with .Site.Params.gitFileURL }}
{{ if and .Site.Params.gitFileURL .File.Path }}
<span class="post-meta-item">
{{ with $.Site.Params.gitFileIcon }}
{{ with .Site.Params.gitFileIcon }}
{{ partial "icon.html" . }}
{{ else }}
{{ partial "icon.html" "file" }}
{{ end }}
<a href="{{ printf "%s/content/%s" . $.File.Path }}" target="_blank" rel="noopener">
<a href="{{ printf "%s/content/%s" .Site.Params.gitFileURL .File.Path }}" target="_blank" rel="noopener">
View source
</a>
</span>