bobatheme/layouts/partials/post-meta-item/viewsource.html

14 lines
422 B
HTML

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