From 53a94b591ea8623aa0388fbc78ed4ed7f2dea387 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 1 Nov 2023 18:33:55 +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. --- .../{ => wowchemy-core}/functions/get_author_name.html | 0 .../{ => wowchemy-core}/functions/get_featured_image.html | 0 .../partials/{ => wowchemy-core}/functions/get_hook.html | 0 .../partials/{ => wowchemy-core}/functions/get_icon.html | 0 .../partials/{ => wowchemy-core}/functions/get_logo.html | 0 .../partials/{ => wowchemy-core}/functions/get_logo_url.html | 4 ++-- .../{ => wowchemy-core}/functions/get_page_title.html | 0 .../{ => wowchemy-core}/functions/get_sort_by_parameter.html | 0 8 files changed, 2 insertions(+), 2 deletions(-) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_author_name.html (100%) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_featured_image.html (100%) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_hook.html (100%) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_icon.html (100%) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_logo.html (100%) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_logo_url.html (57%) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_page_title.html (100%) rename modules/wowchemy-core/layouts/partials/{ => wowchemy-core}/functions/get_sort_by_parameter.html (100%) diff --git a/modules/wowchemy-core/layouts/partials/functions/get_author_name.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_author_name.html similarity index 100% rename from modules/wowchemy-core/layouts/partials/functions/get_author_name.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_author_name.html diff --git a/modules/wowchemy-core/layouts/partials/functions/get_featured_image.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_featured_image.html similarity index 100% rename from modules/wowchemy-core/layouts/partials/functions/get_featured_image.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_featured_image.html diff --git a/modules/wowchemy-core/layouts/partials/functions/get_hook.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_hook.html similarity index 100% rename from modules/wowchemy-core/layouts/partials/functions/get_hook.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_hook.html diff --git a/modules/wowchemy-core/layouts/partials/functions/get_icon.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_icon.html similarity index 100% rename from modules/wowchemy-core/layouts/partials/functions/get_icon.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_icon.html diff --git a/modules/wowchemy-core/layouts/partials/functions/get_logo.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_logo.html similarity index 100% rename from modules/wowchemy-core/layouts/partials/functions/get_logo.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_logo.html diff --git a/modules/wowchemy-core/layouts/partials/functions/get_logo_url.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_logo_url.html similarity index 57% rename from modules/wowchemy-core/layouts/partials/functions/get_logo_url.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_logo_url.html index e51e0af4..e4db23a1 100644 --- a/modules/wowchemy-core/layouts/partials/functions/get_logo_url.html +++ b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_logo_url.html @@ -4,9 +4,9 @@ {{ $logo_url := "" }} {{ if resources.Get "media/logo.png" | or (resources.Get "media/logo.svg") }} - {{ $logo_url = (partial "functions/get_logo" (dict "constraint" "fit" "size" 192)).Permalink }} + {{ $logo_url = (partial "wowchemy-core/functions/get_logo" (dict "constraint" "fit" "size" 192)).Permalink }} {{ else }} - {{ $logo_url = (partial "functions/get_icon" 192).Permalink }} + {{ $logo_url = (partial "wowchemy-core/functions/get_icon" 192).Permalink }} {{ end }} {{ return $logo_url }} diff --git a/modules/wowchemy-core/layouts/partials/functions/get_page_title.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_page_title.html similarity index 100% rename from modules/wowchemy-core/layouts/partials/functions/get_page_title.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_page_title.html diff --git a/modules/wowchemy-core/layouts/partials/functions/get_sort_by_parameter.html b/modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_sort_by_parameter.html similarity index 100% rename from modules/wowchemy-core/layouts/partials/functions/get_sort_by_parameter.html rename to modules/wowchemy-core/layouts/partials/wowchemy-core/functions/get_sort_by_parameter.html