From c78d819e3689815f7355d8a1a5832f3d9bb37b34 Mon Sep 17 00:00:00 2001 From: kodster28 Date: Wed, 19 Feb 2025 07:54:47 -0600 Subject: [PATCH 1/2] [Astro] 1.1.1.1 product selector for head --- src/components/overrides/Head.astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/overrides/Head.astro b/src/components/overrides/Head.astro index 43ef3e42732cea..9bfbd720b7c6f1 100644 --- a/src/components/overrides/Head.astro +++ b/src/components/overrides/Head.astro @@ -5,8 +5,10 @@ import { differenceInCalendarDays } from "date-fns"; import "tippy.js/dist/tippy.css"; import { getEntry } from "astro:content"; +import { getCollection } from "astro:content"; -const currentSection = Astro.url.pathname.split("/")[1]; +// grab the current top-level folder. Remove . characters for 1.1.1.1 URL +const currentSection = Astro.url.pathname.split("/")[1].replaceAll(".", ""); if (currentSection) { const product = await getEntry("products", currentSection); From c5228d102e70a8c4c063b151bc74c1fe90d46bf1 Mon Sep 17 00:00:00 2001 From: kodster28 Date: Wed, 19 Feb 2025 07:57:09 -0600 Subject: [PATCH 2/2] remove testing --- src/components/overrides/Head.astro | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/overrides/Head.astro b/src/components/overrides/Head.astro index 9bfbd720b7c6f1..0021e2de4a9e88 100644 --- a/src/components/overrides/Head.astro +++ b/src/components/overrides/Head.astro @@ -5,7 +5,6 @@ import { differenceInCalendarDays } from "date-fns"; import "tippy.js/dist/tippy.css"; import { getEntry } from "astro:content"; -import { getCollection } from "astro:content"; // grab the current top-level folder. Remove . characters for 1.1.1.1 URL const currentSection = Astro.url.pathname.split("/")[1].replaceAll(".", "");