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

14 lines
497 B
HTML
Raw Normal View History

2021-11-15 21:03:07 -06:00
{{ if and .Site.Params.gitFileURL .File.Path }}
<span class="post-meta-item post-meta-view-source" aria-label="{{ i18n "aria_post_meta_view_source" }}">
{{ 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 }}