Omphaloskepsis-2/layouts/shortcodes/cite.html
2023-04-08 12:57:21 -06:00

16 lines
579 B
HTML

{{ if .Params.href }}
<a href="{{ if eq .Params.href "asCite" }}{{ .Params.cite }}{{ else }}{{ .Params.href }}{{end}}" target="_blank" rel="noopener noreferrer">
<cite class="cite {{ with .Params.citeStyle }}cite--{{ . }}{{ end }}"
{{ with .Params.cite }}cite="{{ . }}"{{ end }}
itemscope
itemtype="https://schema.org/
{{- with .Params.schemaType -}}
{{- . -}}
{{- else -}}
CreativeWork
{{- end -}}"
>
{{- .Params.title -}}
</cite>
</a>
{{ end }}