From c859a7694882a77c24f4220733ed4a29f1127eba Mon Sep 17 00:00:00 2001 From: Riley Seaburg Date: Mon, 17 Jun 2024 13:08:41 -0500 Subject: [PATCH 1/5] Update HUGO security settings to allow BASEURL --- config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.yml b/config.yml index fb7e481cdd..c70218238d 100644 --- a/config.yml +++ b/config.yml @@ -108,6 +108,7 @@ security: getenv: - ^SITE_ - ^BRANCH + - ^BASEURL menu: primary: From 415c9aff1a89c76878fec21ebf2b63deb7155193 Mon Sep 17 00:00:00 2001 From: Riley Seaburg Date: Mon, 17 Jun 2024 13:12:46 -0500 Subject: [PATCH 2/5] Updated the OpenGraph og:url meta tag to dynamically generate the base URL using the BASEURL environment variable. This ensures accurate URL creation for different environments, improving SEO and link integrity. Defaults to https://digital.gov if the variable is not set. --- themes/digital.gov/layouts/partials/core/head.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/digital.gov/layouts/partials/core/head.html b/themes/digital.gov/layouts/partials/core/head.html index fc350f674d..a88f7969b2 100644 --- a/themes/digital.gov/layouts/partials/core/head.html +++ b/themes/digital.gov/layouts/partials/core/head.html @@ -117,7 +117,9 @@ content="{{- $.Params.summary | default $.Site.Params.description | markdownify -}}" /> - + {{ $baseURL := getenv "BASEURL" | default "https://digital.gov" }} + + From 485f57a3391df63fba8386fb2b7bb4d5080610e7 Mon Sep 17 00:00:00 2001 From: Riley Seaburg Date: Mon, 17 Jun 2024 13:18:24 -0500 Subject: [PATCH 3/5] Format template --- themes/digital.gov/layouts/partials/core/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/digital.gov/layouts/partials/core/head.html b/themes/digital.gov/layouts/partials/core/head.html index a88f7969b2..33ebd580db 100644 --- a/themes/digital.gov/layouts/partials/core/head.html +++ b/themes/digital.gov/layouts/partials/core/head.html @@ -118,7 +118,7 @@ /> {{ $baseURL := getenv "BASEURL" | default "https://digital.gov" }} - + From 9fe8d79ea729a73610c1cc51f059c29c95b4db67 Mon Sep 17 00:00:00 2001 From: Riley Seaburg Date: Thu, 20 Jun 2024 11:59:12 -0500 Subject: [PATCH 4/5] push logging statement --- themes/digital.gov/layouts/partials/core/head.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/digital.gov/layouts/partials/core/head.html b/themes/digital.gov/layouts/partials/core/head.html index 33ebd580db..f3e844b934 100644 --- a/themes/digital.gov/layouts/partials/core/head.html +++ b/themes/digital.gov/layouts/partials/core/head.html @@ -119,7 +119,9 @@ {{ $baseURL := getenv "BASEURL" | default "https://digital.gov" }} - + From deec30583466428e0a9740222759b4ec49cce382 Mon Sep 17 00:00:00 2001 From: Riley Seaburg Date: Thu, 20 Jun 2024 14:31:27 -0500 Subject: [PATCH 5/5] test new variable path --- config.yml | 1 + themes/digital.gov/layouts/partials/core/head.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.yml b/config.yml index c70218238d..1f24bbf93d 100644 --- a/config.yml +++ b/config.yml @@ -109,6 +109,7 @@ security: - ^SITE_ - ^BRANCH - ^BASEURL + - ^site.baseurl menu: primary: diff --git a/themes/digital.gov/layouts/partials/core/head.html b/themes/digital.gov/layouts/partials/core/head.html index f3e844b934..3584d4cbcf 100644 --- a/themes/digital.gov/layouts/partials/core/head.html +++ b/themes/digital.gov/layouts/partials/core/head.html @@ -117,7 +117,7 @@ content="{{- $.Params.summary | default $.Site.Params.description | markdownify -}}" /> - {{ $baseURL := getenv "BASEURL" | default "https://digital.gov" }} + {{ $baseURL := getenv "site.baseurl" | default "https://digital.gov" }}