From 62f5b139d3c522bcf9c9da6034dd341183995641 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 20 Aug 2025 00:24:39 +0100 Subject: [PATCH] feat: apply more Hugo breaking changes of /partials -> /_partials For compatibility with Hugo ~v0.148 --- .../layouts/_partials/functions/parse_block_v1.html | 2 +- .../layouts/_partials/functions/parse_block_v2.html | 2 +- modules/blox-bootstrap/layouts/_partials/site_footer.html | 2 +- modules/blox-bootstrap/layouts/baseof.html | 2 +- .../layouts/_partials/blox-core/functions/get_hook.html | 2 +- modules/blox-plugin-decap-cms/config.yaml | 2 +- modules/blox-tailwind/layouts/_partials/functions/get_hook.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v1.html b/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v1.html index 744c0536..5ae90440 100644 --- a/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v1.html +++ b/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v1.html @@ -12,7 +12,7 @@ {{ if eq $block_type "featured" }}{{ $block_type = "collection" }}{{ end }}{{/* Support legacy Featured block */}} {{ $widget_path := printf "blocks/v1/%s.html" $block_type }} {{ if not (templates.Exists (printf "_partials/%s" $widget_path)) }} - {{ errorf "%s uses a `%s` block but the `%s` block was not found at `layouts/partials/%s`" $block.File.Path $block_type $block_type $widget_path }} + {{ errorf "%s uses a `%s` block but the `%s` block was not found at `layouts/_partials/%s`" $block.File.Path $block_type $block_type $widget_path }} {{ end }} {{/* Workaround to make Hugo's .Page.Store.Set cascade up to the parent of headless pages */}} diff --git a/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v2.html b/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v2.html index c72eb82c..a42f0d41 100644 --- a/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v2.html +++ b/modules/blox-bootstrap/layouts/_partials/functions/parse_block_v2.html @@ -8,7 +8,7 @@ {{ $block_type := lower $block.block | default "markdown" }} {{ $block_path := printf "blocks/%s.html" $block_type }} {{ if not (templates.Exists (printf "_partials/%s" $block_path)) }} - {{ errorf "%s uses a `%s` block but the `%s` block was not found at `layouts/partials/%s`" $block.File.Path $block_type $block_type $block_path }} + {{ errorf "%s uses a `%s` block but the `%s` block was not found at `layouts/_partials/%s`" $block.File.Path $block_type $block_type $block_path }} {{ end }} {{/* Mermaid block: Workaround to make Hugo's .Page.Store.Set cascade up to the parent of headless pages */}} diff --git a/modules/blox-bootstrap/layouts/_partials/site_footer.html b/modules/blox-bootstrap/layouts/_partials/site_footer.html index 0add8bd0..5d8b11b5 100644 --- a/modules/blox-bootstrap/layouts/_partials/site_footer.html +++ b/modules/blox-bootstrap/layouts/_partials/site_footer.html @@ -6,7 +6,7 @@ {{ $footer_section_name := site.Params.footer.block | default "minimal" }} {{ $footer_section_path := printf "components/footers/%s.html" $footer_section_name }} {{ if not (templates.Exists (printf "_partials/%s" $footer_section_path)) }} - {{ errorf "Check your `params.yaml`. Cannot find footer block at `layouts/partials/%s`" $footer_section_path }} + {{ errorf "Check your `params.yaml`. Cannot find footer block at `layouts/_partials/%s`" $footer_section_path }} {{ end }} {{ partial $footer_section_path . }} diff --git a/modules/blox-bootstrap/layouts/baseof.html b/modules/blox-bootstrap/layouts/baseof.html index 9227aedb..779bcda7 100644 --- a/modules/blox-bootstrap/layouts/baseof.html +++ b/modules/blox-bootstrap/layouts/baseof.html @@ -41,7 +41,7 @@ {{ $block_name := .Params.header.navbar.block | default site.Params.header.navbar.block | default "navbar" }} {{ $block_path := printf "components/headers/%s.html" $block_name }} {{ if not (templates.Exists (printf "_partials/%s" $block_path)) }} - {{ errorf "Check your `header` config in `params.yaml` and/or front matter. Cannot find header block at `layouts/partials/%s`" $block_path }} + {{ errorf "Check your `header` config in `params.yaml` and/or front matter. Cannot find header block at `layouts/_partials/%s`" $block_path }} {{ end }} {{ partial $block_path . }} diff --git a/modules/blox-core/layouts/_partials/blox-core/functions/get_hook.html b/modules/blox-core/layouts/_partials/blox-core/functions/get_hook.html index 980c9b3f..4cc14277 100644 --- a/modules/blox-core/layouts/_partials/blox-core/functions/get_hook.html +++ b/modules/blox-core/layouts/_partials/blox-core/functions/get_hook.html @@ -5,7 +5,7 @@ {{ $loaded := false }} {{ $partial_dir := printf "hooks/%s/" .hook }} {{ $context := .context }} -{{ $hook_dir_path := path.Join "layouts/_partials" $partial_dir }} +{{ $hook_dir_path := path.Join "layouts/_partialss" $partial_dir }} {{ if fileExists $hook_dir_path }} {{ range os.ReadDir $hook_dir_path }} {{ if not .IsDir }} diff --git a/modules/blox-plugin-decap-cms/config.yaml b/modules/blox-plugin-decap-cms/config.yaml index 51d2e8eb..0a33a9dc 100644 --- a/modules/blox-plugin-decap-cms/config.yaml +++ b/modules/blox-plugin-decap-cms/config.yaml @@ -3,7 +3,7 @@ module: - source: data target: data - source: functions - target: layouts/partials/mod-decap-cms + target: layouts/_partials/mod-decap-cms - source: templates target: layouts/decap_cms outputFormats: diff --git a/modules/blox-tailwind/layouts/_partials/functions/get_hook.html b/modules/blox-tailwind/layouts/_partials/functions/get_hook.html index 5791dfb8..980c9b3f 100644 --- a/modules/blox-tailwind/layouts/_partials/functions/get_hook.html +++ b/modules/blox-tailwind/layouts/_partials/functions/get_hook.html @@ -5,7 +5,7 @@ {{ $loaded := false }} {{ $partial_dir := printf "hooks/%s/" .hook }} {{ $context := .context }} -{{ $hook_dir_path := path.Join "layouts/partials" $partial_dir }} +{{ $hook_dir_path := path.Join "layouts/_partials" $partial_dir }} {{ if fileExists $hook_dir_path }} {{ range os.ReadDir $hook_dir_path }} {{ if not .IsDir }}