mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-25 18:22:09 +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>
|