From 5f086c68fba662ca5d575c30c86c2bee3a2b9c38 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 1 Nov 2023 18:40:04 +0000 Subject: [PATCH] modules: namespace Core module Hugo does not namespace modules by default, leading to conflicts. Hence, load partials from a namespaced sub-folder to prevent conflicts with similarly named files in other modules. --- modules/wowchemy/go.mod | 5 ++--- modules/wowchemy/layouts/partials/blocks/collection.html | 2 +- modules/wowchemy/layouts/partials/blocks/portfolio.html | 2 +- modules/wowchemy/layouts/partials/page_header.html | 2 +- modules/wowchemy/layouts/partials/site_footer.html | 2 +- modules/wowchemy/layouts/partials/site_head.html | 6 +++--- modules/wowchemy/layouts/partials/site_js.html | 2 +- modules/wowchemy/layouts/partials/views/card.html | 2 +- modules/wowchemy/layouts/partials/views/compact.html | 2 +- modules/wowchemy/layouts/partials/views/showcase.html | 2 +- 10 files changed, 13 insertions(+), 14 deletions(-) diff --git a/modules/wowchemy/go.mod b/modules/wowchemy/go.mod index fa9b4e01..23da73fb 100644 --- a/modules/wowchemy/go.mod +++ b/modules/wowchemy/go.mod @@ -3,7 +3,6 @@ module github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 go 1.15 require ( - github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.2.0 - github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-seo v0.1.0 + github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.2.1-0.20231101183733-7b61e2f369e6 + github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-seo v0.1.1-0.20231101183733-7b61e2f369e6 ) - diff --git a/modules/wowchemy/layouts/partials/blocks/collection.html b/modules/wowchemy/layouts/partials/blocks/collection.html index 2effdc6d..7268c093 100644 --- a/modules/wowchemy/layouts/partials/blocks/collection.html +++ b/modules/wowchemy/layouts/partials/blocks/collection.html @@ -63,7 +63,7 @@ {{/* Sort */}} {{ $sort_by := $block.content.sort_by | default "Date" }} -{{ $sort_by = partial "functions/get_sort_by_parameter" $sort_by }} +{{ $sort_by = partial "wowchemy-core/functions/get_sort_by_parameter" $sort_by }} {{ $sort_ascending := $block.content.sort_ascending | default (eq $block.content.order "asc") | default false }} {{ $sort_order := cond $sort_ascending "asc" "desc" }} {{ $query = sort $query $sort_by $sort_order }} diff --git a/modules/wowchemy/layouts/partials/blocks/portfolio.html b/modules/wowchemy/layouts/partials/blocks/portfolio.html index c0d47096..d542e203 100644 --- a/modules/wowchemy/layouts/partials/blocks/portfolio.html +++ b/modules/wowchemy/layouts/partials/blocks/portfolio.html @@ -87,7 +87,7 @@ {{/* Sort */}} {{ $sort_by := $block.content.sort_by | default "Date" }} - {{ $sort_by = partial "functions/get_sort_by_parameter" $sort_by }} + {{ $sort_by = partial "wowchemy-core/functions/get_sort_by_parameter" $sort_by }} {{ $sort_ascending := $block.content.sort_ascending | default (eq $block.content.order "asc") | default false }} {{ $sort_order := cond $sort_ascending "asc" "desc" }} {{ $query = sort $query $sort_by $sort_order }} diff --git a/modules/wowchemy/layouts/partials/page_header.html b/modules/wowchemy/layouts/partials/page_header.html index b03f82e3..24a37b6b 100644 --- a/modules/wowchemy/layouts/partials/page_header.html +++ b/modules/wowchemy/layouts/partials/page_header.html @@ -1,5 +1,5 @@ {{ $page := . }} -{{ $featured := partial "functions/get_featured_image.html" $page }} +{{ $featured := partial "wowchemy-core/functions/get_featured_image.html" $page }} {{ $anchor := $page.Params.image.focal_point | default "Smart" }} diff --git a/modules/wowchemy/layouts/partials/site_footer.html b/modules/wowchemy/layouts/partials/site_footer.html index 9c59d51d..ca2cc8e8 100644 --- a/modules/wowchemy/layouts/partials/site_footer.html +++ b/modules/wowchemy/layouts/partials/site_footer.html @@ -1,6 +1,6 @@