From 7b61e2f369e6ca227facdebeecd9f3822e7e99de Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 1 Nov 2023 18:37:33 +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-plugin-reveal/go.mod | 4 +-- .../layouts/slides/baseof.html | 4 +-- modules/wowchemy-seo/go.mod | 4 +-- .../wowchemy-seo/layouts/index.webmanifest | 4 +-- .../layouts/partials/jsonld/article.html | 6 ++-- .../layouts/partials/jsonld/business.html | 2 +- .../layouts/partials/jsonld/event.html | 4 +-- .../layouts/partials/seo_tags.html | 31 ++++++++++++++----- 8 files changed, 36 insertions(+), 23 deletions(-) diff --git a/modules/wowchemy-plugin-reveal/go.mod b/modules/wowchemy-plugin-reveal/go.mod index e17730d8..ad167e82 100644 --- a/modules/wowchemy-plugin-reveal/go.mod +++ b/modules/wowchemy-plugin-reveal/go.mod @@ -2,6 +2,4 @@ module github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal go 1.15 -require ( - github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.1.0 -) +require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.2.1-0.20231101183355-53a94b591ea8 diff --git a/modules/wowchemy-plugin-reveal/layouts/slides/baseof.html b/modules/wowchemy-plugin-reveal/layouts/slides/baseof.html index 6c7deafe..02f64e10 100644 --- a/modules/wowchemy-plugin-reveal/layouts/slides/baseof.html +++ b/modules/wowchemy-plugin-reveal/layouts/slides/baseof.html @@ -16,8 +16,8 @@ {{ end }} - - + + diff --git a/modules/wowchemy-seo/go.mod b/modules/wowchemy-seo/go.mod index 4c60a7e6..f60f026b 100644 --- a/modules/wowchemy-seo/go.mod +++ b/modules/wowchemy-seo/go.mod @@ -2,6 +2,4 @@ module github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-seo go 1.15 -require ( - github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.1.0 -) +require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.2.1-0.20231101183355-53a94b591ea8 diff --git a/modules/wowchemy-seo/layouts/index.webmanifest b/modules/wowchemy-seo/layouts/index.webmanifest index 0d30abc5..2b2b2ae1 100644 --- a/modules/wowchemy-seo/layouts/index.webmanifest +++ b/modules/wowchemy-seo/layouts/index.webmanifest @@ -7,11 +7,11 @@ "theme_color": "{{ $theme_color }}", "background_color": "{{ $theme_color }}", "icons": [{ - "src": "{{ (partial "functions/get_icon" 192).RelPermalink }}", + "src": "{{ (partial "wowchemy-core/functions/get_icon" 192).RelPermalink }}", "sizes": "192x192", "type": "image/png" }, { - "src": "{{ (partial "functions/get_icon" 512).RelPermalink }}", + "src": "{{ (partial "wowchemy-core/functions/get_icon" 512).RelPermalink }}", "sizes": "512x512", "type": "image/png" }], diff --git a/modules/wowchemy-seo/layouts/partials/jsonld/article.html b/modules/wowchemy-seo/layouts/partials/jsonld/article.html index 188a0bee..e77c42c7 100644 --- a/modules/wowchemy-seo/layouts/partials/jsonld/article.html +++ b/modules/wowchemy-seo/layouts/partials/jsonld/article.html @@ -1,6 +1,6 @@ {{- $page := .page }} {{ $summary := .summary }} -{{ $featured_image := partial "functions/get_featured_image.html" $page }} +{{ $featured_image := partial "wowchemy-core/functions/get_featured_image.html" $page }} {{/* Get schema type. */}} {{ $schema := "Article" }} @@ -8,9 +8,9 @@ {{ $schema = "BlogPosting" }} {{ end }} -{{ $author := partial "functions/get_author_name" $page }} +{{ $author := partial "wowchemy-core/functions/get_author_name" $page }} {{ $publisher := site.Params.marketing.seo.org_name | default site.Title }} -{{ $logo_url := partial "functions/get_logo_url" $page -}} +{{ $logo_url := partial "wowchemy-core/functions/get_logo_url" $page -}}