From e3ffa5ed3727b8fedb703c222aab66b350da0acb Mon Sep 17 00:00:00 2001 From: Stefan Dietz Date: Thu, 15 May 2025 14:49:51 +0200 Subject: [PATCH 1/3] Fix docs link on homepage --- src/pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 83e358d917..8122cb9be7 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -39,7 +39,7 @@ const HomepageButtons: FunctionComponent = () => { > Date: Thu, 15 May 2025 14:50:12 +0200 Subject: [PATCH 2/3] Remove trailing slash when switching language to avoid invalid links --- src/components/LanguageSwitch.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/LanguageSwitch.tsx b/src/components/LanguageSwitch.tsx index 14717dc518..1c239ef458 100644 --- a/src/components/LanguageSwitch.tsx +++ b/src/components/LanguageSwitch.tsx @@ -13,8 +13,9 @@ export const LanguageSwitch: FC = () => { const relativePath = normalizedPathname.startsWith(baseUrl) ? normalizedPathname.slice(baseUrl.length) : normalizedPathname; + const relativePathWithoutTrailingSlash = relativePath.replace(/\/$/, ''); const isGerman = i18n.currentLocale === 'de'; - const switchTo = `${baseUrlWithoutLanguage}${isGerman ? 'en/' : ''}${relativePath}`; + const switchTo = `${baseUrlWithoutLanguage}${isGerman ? 'en/' : ''}${relativePathWithoutTrailingSlash}`; return (
From 9eab806d2649d2c52d5b51e3e0b6aab6f6925b4a Mon Sep 17 00:00:00 2001 From: Stefan Dietz Date: Thu, 15 May 2025 15:10:41 +0200 Subject: [PATCH 3/3] Add no-build flag for Netlify deployments --- .github/workflows/draft-deploy.yml | 2 +- .github/workflows/test-deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/draft-deploy.yml b/.github/workflows/draft-deploy.yml index 99223834b8..5c6c13eb0d 100644 --- a/.github/workflows/draft-deploy.yml +++ b/.github/workflows/draft-deploy.yml @@ -30,7 +30,7 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }} with: - args: deploy --dir=dist + args: deploy --dir=dist --no-build - name: Find comment uses: peter-evans/find-comment@v3 diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 336e2bcece..dbbf521272 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -31,4 +31,4 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }} with: - args: deploy --dir=dist --alias="$GITHUB_REF_NAME" + args: deploy --dir=dist --alias="$GITHUB_REF_NAME" --no-build