From d156e34a0802ba24822edba3e514022c2e7e0c88 Mon Sep 17 00:00:00 2001 From: willbreitkreutz Date: Mon, 11 May 2026 15:58:21 -0500 Subject: [PATCH 1/4] Run at /groundwork locally to better emulate docs site --- vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index a16cba7..48c2c2c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -43,7 +43,7 @@ export default defineConfig(({ mode }) => { const base = mode === "production" ? "https://usace.github.io/groundwork/" - : "http://localhost:5173/"; + : "http://localhost:5173/groundwork/"; return { plugins: [react()], base: base, From 9945c66f70ac0021db8437c795c3872115facb78 Mon Sep 17 00:00:00 2001 From: willbreitkreutz Date: Mon, 11 May 2026 15:59:25 -0500 Subject: [PATCH 2/4] Modify docs template to make home button and breadcrumbs work better. Remove any logic from breadcrumb items, just use the href provided. --- src/app-pages/documentation/_docs-page.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app-pages/documentation/_docs-page.jsx b/src/app-pages/documentation/_docs-page.jsx index a6795e6..07ae4de 100644 --- a/src/app-pages/documentation/_docs-page.jsx +++ b/src/app-pages/documentation/_docs-page.jsx @@ -8,11 +8,11 @@ function DocsPage({ breadcrumbs = [], children }) { const { hash } = useConnect("selectHash"); return ( - + {breadcrumbs.map((breadcrumb) => ( ))} From 294dfd0683b53c575a4b40a33be2ede92b9c8f92 Mon Sep 17 00:00:00 2001 From: willbreitkreutz Date: Mon, 11 May 2026 16:00:23 -0500 Subject: [PATCH 3/4] Add a `homeUrl` prop to the site wrapper that drives the href of the usace logo in the header, just pass that href down, or if not provided bail with a `#` --- lib/components/navigation/breadcrumbs.jsx | 4 +--- lib/composite/header/index.jsx | 10 ++++------ lib/composite/site-wrapper/index.jsx | 2 ++ src/App.jsx | 3 ++- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/components/navigation/breadcrumbs.jsx b/lib/components/navigation/breadcrumbs.jsx index 8938147..11f3503 100644 --- a/lib/components/navigation/breadcrumbs.jsx +++ b/lib/components/navigation/breadcrumbs.jsx @@ -4,8 +4,6 @@ import { MdHome } from "react-icons/md"; import { VscChevronRight } from "react-icons/vsc"; import Link from "./link"; -const BASE_URL = import.meta.env.BASE_URL; - function BreadcrumbItem({ className, href, text }) { const breadcrumbItemClass = useMemo(() => { return gwMerge( @@ -44,7 +42,7 @@ function Breadcrumbs({ className, children, baseUrl }) {
  • diff --git a/lib/composite/header/index.jsx b/lib/composite/header/index.jsx index b3917e5..d195666 100644 --- a/lib/composite/header/index.jsx +++ b/lib/composite/header/index.jsx @@ -7,8 +7,6 @@ import { useState } from "react"; import gwMerge from "../../gw-merge"; import Link from "../../components/navigation/link"; -const BASE_URL = import.meta.env.BASE_URL; - function Title({ title = "", subtitle = "" }) { return (
    - +
    - + {navRight ? navRight : null} diff --git a/lib/composite/site-wrapper/index.jsx b/lib/composite/site-wrapper/index.jsx index 23a53d6..21cd1ff 100644 --- a/lib/composite/site-wrapper/index.jsx +++ b/lib/composite/site-wrapper/index.jsx @@ -12,6 +12,7 @@ function SiteWrapper({ msgBanner = undefined, msgBannerPosition = "top", title = "US Army Corps of Engineers", + homeUrl = "#", fluidNav = false, subtitle = "", missionText = "", @@ -51,6 +52,7 @@ function SiteWrapper({ subtitle={subtitle} navRight={navRight} fluidNav={fluidNav} + homeUrl={homeUrl} /> {msgBanner && msgBannerPosition === "bottom" ? msgBanner : null} diff --git a/src/App.jsx b/src/App.jsx index a0a408c..762d28e 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -39,13 +39,14 @@ function App() {
    { // Remove BASE_URL# before it is added again by the navhelper so it can be included in the hrefs for copy url purposes - if (url.includes(`${BASE_URL}#`)) url = url.replace(`${BASE_URL}#`, ""); + url = url.replace(`${BASE_URL}#`, ""); doUpdateHash(url); })} > Date: Mon, 11 May 2026 16:02:11 -0500 Subject: [PATCH 4/4] add `homeUrl` prop to SiteWrapper docs --- src/app-pages/documentation/app-shell/site-wrapper.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app-pages/documentation/app-shell/site-wrapper.jsx b/src/app-pages/documentation/app-shell/site-wrapper.jsx index c600f26..ad3d9a1 100644 --- a/src/app-pages/documentation/app-shell/site-wrapper.jsx +++ b/src/app-pages/documentation/app-shell/site-wrapper.jsx @@ -57,6 +57,12 @@ const siteWrapperProps = [ default: "true", desc: "If true, the footer will be displayed at the bottom of the page. Set to false to hide the footer in case you need the screen space for something like a map viewer.", }, + { + name: "homeUrl", + type: "string", + default: "#", + desc: "Sets the href on the Corps Castle in the header.", + }, { name: "title", type: "string",