trwnh.com/unified.test.hugo/layouts/shortcodes/mf2/h-cite.html
2024-10-05 01:27:07 -05:00

29 lines
No EOL
581 B
HTML

{{ $datapath := (split (.Get "author") "/") }}
{{ $author := .Site.Data.people }}
{{ range $datapath }}
{{ $author = index $author . }}
{{ end }}
<blockquote class="h-cite">
{{ with $author }}
<span class="p-author">
{{ partial "mf2/h-card.html" . }}
</span>
{{ end }}
{{ with .Inner }}
<div class="e-content">
{{.}}
</div>
{{ end }}
<cite>
{{ with .Get "post-url" }}
<a href="{{.}}" class="u-url">
{{ with $.Get "post-name" }}
<span class="p-name">{{.}}</span>
{{ else }}
<span>[source]</span>
{{ end }}
</a>
{{ end }}
</cite>
</blockquote>