feat: update partials path for recent Hugo breaking changes

Completes previous commit 9fce47f
This commit is contained in:
George Cushen committed 2025-11-12 19:48:04 +00:00
1 parent 9fce47f11e
commit 765ecf7da2
3 files changed
+4 -4

No files matched your search

@@ -10,7 +10,7 @@
{{ if not (templates.Exists (printf "_partials/views/%s.html" $view)) }}
{{/* Fallback to card view */}}
{{ warnf "Failed to locate view at `partials/views/%s.html`. Check you specified a supported `view` in `%s`" $view $page.File.Path }}
{{ warnf "Failed to locate view at `_partials/views/%s.html`. Check you specified a supported `view` in `%s`" $view $page.File.Path }}
{{ $view = "card" }}
{{ end }}
@@ -1,6 +1,6 @@
{{/* HBX resolver: maps a section { block: "<id>", ... } to the block partial.
This resolver looks up blocks from the blox/<block-id>/block.html structure,
which are mounted to layouts/partials/hbx/blocks/<block-id>/block.html via module.yaml.
which are mounted to layouts/_partials/hbx/blocks/<block-id>/block.html via module.yaml.
*/}}
{{- $id := .section.block -}}
{{- if not $id }}{{ errorf "HBX: section is missing 'block' key: %v" .section }}{{ end -}}
@@ -8,7 +8,7 @@
{{- $params := .section -}}
{{- $path := printf "hbx/blocks/%s/block.html" $id -}}
{{- if templates.Exists (printf "partials/%s" $path) -}}
{{- if templates.Exists (printf "_partials/%s" $path) -}}
{{ partial $path (dict "wcPage" .ctx "wcBlock" $params "wcIdentifier" ($params.id | default (printf "section-%s" $id))) }}
{{- else -}}
{{ errorf "HBX: block '%s' not found at %q" $id $path }}
@@ -1,5 +1,5 @@
{{/* Load Hugo Blox - HBX resolver-based system
Blocks live in `blox/<block-id>/block.html` and are mounted to `layouts/partials/hbx/blocks/<block-id>/block.html`.
Blocks live in `blox/<block-id>/block.html` and are mounted to `layouts/_partials/hbx/blocks/<block-id>/block.html`.
Landing pages must specify `sections: [{ block: '<id>', ... }]`.
*/}}
{{/* Use unified sections source */}}