Skip to content

Commit 42e99f5

Browse files
authored
Fix broken links on homepage and language switch & Fix Netlify Deployments (#320)
2 parents 3e3370f + 9eab806 commit 42e99f5

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.github/workflows/draft-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
3131
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
3232
with:
33-
args: deploy --dir=dist
33+
args: deploy --dir=dist --no-build
3434

3535
- name: Find comment
3636
uses: peter-evans/find-comment@v3

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
3232
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
3333
with:
34-
args: deploy --dir=dist --alias="$GITHUB_REF_NAME"
34+
args: deploy --dir=dist --alias="$GITHUB_REF_NAME" --no-build

src/components/LanguageSwitch.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ export const LanguageSwitch: FC = () => {
1313
const relativePath = normalizedPathname.startsWith(baseUrl)
1414
? normalizedPathname.slice(baseUrl.length)
1515
: normalizedPathname;
16+
const relativePathWithoutTrailingSlash = relativePath.replace(/\/$/, '');
1617
const isGerman = i18n.currentLocale === 'de';
17-
const switchTo = `${baseUrlWithoutLanguage}${isGerman ? 'en/' : ''}${relativePath}`;
18+
const switchTo = `${baseUrlWithoutLanguage}${isGerman ? 'en/' : ''}${relativePathWithoutTrailingSlash}`;
1819

1920
return (
2021
<div>

src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const HomepageButtons: FunctionComponent = () => {
3939
></KolLinkButton>
4040
<KolLinkButton
4141
className="w-72"
42-
_href={`/${VERSION_ID}/docs/`}
42+
_href={`/${VERSION_ID}/docs`}
4343
_label={translate({
4444
id: 'custom.documentation-button',
4545
})}

0 commit comments

Comments
 (0)