refactor: rename schemaType to itemtype, fix caching titles

This commit is contained in:
Ben Goldsworthy 2025-05-14 18:44:50 +02:00
parent 28033351c7
commit 417c38cfd1
No known key found for this signature in database
9 changed files with 27 additions and 20 deletions

View file

@ -37,8 +37,13 @@
class="article-header__featured-image"
{{ with .pc.Params.featured_image }}
{{ with ( $.pc.Resources.GetMatch . ) }}
style="background-image: url({{ partialCached "images/get-image.html" ( dict "img" . ) $.pc }})"
style="background-image: url({{ partial "images/get-image.html" ( dict "img" . ) }})"
{{ else }}
{{- if $.pc.Page.Resources -}}
{{- errorf "No Page Resource found for src '%q' (%q).\n\n\tAvailable Page Resources are:\n\t\t%v" . $.pc.Page.File.Path $.pc.Page.Resources -}}
{{- else -}}
{{- warnf "No Page Resource found for src '%q' (%q)." . $.pc.Page.File.Path -}}
{{- end -}}
style="background-image: url({{ . }})"
{{ end }}
{{ end -}}
@ -50,7 +55,7 @@
href="{{ .pc.Permalink }}"
></a>
{{- with .pc.File -}}
{{- partialCached "text/item-title.html" ( dict "pc" $.pc "sc" $.sc "class" "article-header" ) .Filename -}}
{{- partial "text/item-title.html" ( dict "pc" $.pc "sc" $.sc "class" "article-header" ) -}}
{{- else -}}
{{- partial "text/item-title.html" ( dict "pc" $.pc "sc" $.sc "class" "article-header" ) -}}
{{- end -}}