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
1 changed files with 3 additions and 3 deletions

View File

@ -1,12 +1,12 @@
{{ with .Site.Params.gitFileURL }} {{ if and .Site.Params.gitFileURL .File.Path }}
<span class="post-meta-item"> <span class="post-meta-item">
{{ with $.Site.Params.gitFileIcon }} {{ with .Site.Params.gitFileIcon }}
{{ partial "icon.html" . }} {{ partial "icon.html" . }}
{{ else }} {{ else }}
{{ partial "icon.html" "file" }} {{ partial "icon.html" "file" }}
{{ end }} {{ 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 View source
</a> </a>
</span> </span>