From 11d3251c67ac0b592d947dfef4696cf2b9d54fe3 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Tue, 3 Jan 2023 23:02:41 +0100 Subject: [PATCH] add base path + use relative links --- website/astro.config.mjs | 2 +- website/src/components/HeadCommon.astro | 12 +++++++++--- website/src/components/Header/Header.astro | 2 +- website/src/components/LeftSidebar/LeftSidebar.astro | 6 ++++-- website/src/components/PageContent/PageContent.astro | 3 ++- .../src/components/RightSidebar/RightSidebar.astro | 3 ++- .../src/components/RightSidebar/TableOfContents.tsx | 7 +++++-- website/src/pages/swatch/index.astro | 11 ++++++----- website/src/repl/prebake.mjs | 9 ++++----- 9 files changed, 34 insertions(+), 21 deletions(-) diff --git a/website/astro.config.mjs b/website/astro.config.mjs index 6714f548..9dca58df 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -31,7 +31,7 @@ export default defineConfig({ tailwind(), ], site: `https://strudel.tidalcycles.org`, - base: '', + base: '/', }); /* diff --git a/website/src/components/HeadCommon.astro b/website/src/components/HeadCommon.astro index 410e9b91..9a1ed6f8 100644 --- a/website/src/components/HeadCommon.astro +++ b/website/src/components/HeadCommon.astro @@ -1,5 +1,9 @@ --- import '../styles/index.css'; + +const { url } = Astro; +const { BASE_URL } = import.meta.env; +const base = url.origin + BASE_URL; --- @@ -7,9 +11,11 @@ import '../styles/index.css'; - + - + + + @@ -17,7 +23,7 @@ import '../styles/index.css'; - +