diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2d9736a..285ff45 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,7 +25,7 @@ jobs: with: path: packages/astro # The root location of your Astro project inside the repository. (optional) # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional) - package-manager: npm # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) + package-manager: npm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) deploy: needs: build diff --git a/packages/astro/astro.config.mjs b/packages/astro/astro.config.mjs index 3862157..f8826bd 100644 --- a/packages/astro/astro.config.mjs +++ b/packages/astro/astro.config.mjs @@ -3,6 +3,6 @@ import { defineConfig } from "astro/config"; // https://astro.build/config export default defineConfig({ site: "https://sfbrigade.github.io", - base: "/sfcivictech-site-explorations/packages/astro", + base: "/sfcivictech-site-explorations/packages/astro/", // site: "https://www.sfcivictech.org/" }); diff --git a/packages/astro/src/components/HeaderNav.astro b/packages/astro/src/components/HeaderNav.astro index b65677b..d5b5ad4 100644 --- a/packages/astro/src/components/HeaderNav.astro +++ b/packages/astro/src/components/HeaderNav.astro @@ -1,17 +1,18 @@ --- const routes = [ - ["/wiki", "Wiki"], - ["/getting-started", "Get Started"], - ["/events", "Events"], - ["/projects", "Projects"], - ["/blog", "Blog"], - ["/donate", "Donate"], - ["/about", "About"], + ["wiki", "Wiki"], + ["getting-started", "Get Started"], + ["events", "Events"], + ["projects", "Projects"], + ["blog", "Blog"], + ["donate", "Donate"], + ["about", "About"], ]; // because of annoying differences between dev and build modes, due to this // behavior (https://github.com/withastro/astro/issues/5630), always remove // any trailing slash so currentPath can match the paths above -const currentPath = Astro.url.pathname.replace(/\/$/, ""); +const fullPath = Astro.url.pathname.replace(/\/$/, ""); +const currentPath = fullPath.slice(fullPath.lastIndexOf("/") + 1); ---