38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
{{- $itemType := default "CreativeWork" ( .Params.schemaType ) -}}
|
|
|
|
{{- if ( in $.Site.Data.itemtypes $itemType ) -}}
|
|
{{- with .Params.href -}}
|
|
<a href="{{ if eq . "asCite" }}{{ $.Params.cite }}{{ else }}{{ . }}{{ end }}">
|
|
{{- end -}}
|
|
<cite
|
|
class="cite{{ with .Params.citeStyle }} cite--{{ . }}{{ end }}"
|
|
itemscope
|
|
itemprop="citation"
|
|
itemtype="https://schema.org/{{- $itemType -}}"
|
|
{{- if .Params.titleLang -}}
|
|
lang="{{- .Params.titleLang -}}"
|
|
title="{{- .Params.titleTr -}}"
|
|
{{- end -}}>
|
|
{{- with .Params.cite -}}
|
|
<meta itemprop="url" content="{{ . }}">
|
|
{{- end -}}
|
|
<span itemprop="name">
|
|
{{- if .Params.titleLang -}}
|
|
<i lang="{{ .Params.titleLang }}" title="{{ .Params.titleTr }}">
|
|
{{- end -}}
|
|
{{- if .Params.shortTitle -}}
|
|
{{- .Params.shortTitle | markdownify | safeHTML -}}
|
|
{{- else -}}
|
|
{{- .Params.title | markdownify | safeHTML -}}
|
|
{{- end -}}
|
|
{{- if .Params.titleLang -}}
|
|
</i>
|
|
{{- end -}}
|
|
</span>{{- /**/ -}}
|
|
</cite>
|
|
{{- with .Params.href -}}
|
|
</a>
|
|
{{- end -}}
|
|
{{- else -}}
|
|
{{- warnf "Invalid Schema.org type value: %q (%q)" $itemType .Page.File.Path -}}
|
|
{{- end -}}
|