Files
George Cushen f4280ddb1c refactor: rename modules and update migration docs
BREAKING CHANGE
Module paths moved to `github.com/HugoBlox/kit` with new names:
- core `blox-tailwind` → `blox`
- analytics → `analytics`
- netlify → `integrations/netlify`
- slides (reveal) → `slides`
Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
2026-01-02 20:59:48 +00:00

16 lines
733 B
HTML

{{/* 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.
*/}}
{{- $id := .section.block -}}
{{- if not $id }}{{ errorf "HBX: section is missing 'block' key: %v" .section }}{{ end -}}
{{- $params := .section -}}
{{- $path := printf "hbx/blocks/%s/block.html" $id -}}
{{- 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 }}
{{- end -}}