convert into Hugo module theme

This commit is contained in:
Ben Goldsworthy 2025-01-04 20:22:41 +01:00
parent b07a2a6cf5
commit 04abc92ae5
Signed by: Rumperuu
SSH key fingerprint: SHA256:e5XfzNOr9UvWpEzyLfw0GtTMZWIFh3NmxH+/qQIi3xE
98 changed files with 2137 additions and 15971 deletions

View file

@ -1,38 +0,0 @@
{{- $itemType := default "CreativeWork" ( .Params.schemaType ) -}}
{{- if ( or ( in $.Site.Data.itemtypes $itemType ) ( eq .Params.suppress "true" ) ) -}}
{{- 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 -}}
{{- erroridf "invalid-schema-type" "Invalid Schema.org type value %q for %q" $itemType .Params.title -}}
{{- end -}}