mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-24 05:02:10 +00:00
23 lines
603 B
HTML
23 lines
603 B
HTML
|
<figcaption>
|
||
|
{{ if .Get "type" | eq "code" }}
|
||
|
<strong itemprop="codeSampleType">Code snippet</strong>{{with .Get "lang"}} (<span itemprop="programmingLanguage">{{ . }}</span>){{end}}:
|
||
|
{{- end }}
|
||
|
|
||
|
{{ $contents := (.Inner | markdownify | safeHTML) }}
|
||
|
|
||
|
{{ if .Get "type" | eq "citation" }}
|
||
|
—
|
||
|
<span class="h-cite" itemprop="citation" role="doc-credit">
|
||
|
{{with .Get "partOfType" }}
|
||
|
<span itemprop="isPartOf" itemscope itemtype="https://schema.org/{{ . }}">
|
||
|
{{ end }}
|
||
|
{{ $contents }}
|
||
|
{{with .Get "partOfType" }}
|
||
|
</span>
|
||
|
{{ end }}
|
||
|
</span>
|
||
|
{{ else }}
|
||
|
{{ $contents }}
|
||
|
{{- end }}
|
||
|
</figcaption>
|