trwnh.com/unified.test.hugo/layouts/shortcodes/mf2/h-cite.html

29 lines
581 B
HTML
Raw Normal View History

2024-10-05 06:27:07 +00:00
{{ $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>