tangled
alpha
login
or
join now
finxol.io
/
portfolio
0
fork
atom
Personal site
staging.colinozanne.co.uk
portfolio
astro
0
fork
atom
overview
issues
pulls
pipelines
fix: use default locale from config
finxol.io
4 months ago
b7d78cb0
6e231a53
verified
This commit was signed with the committer's
known signature
.
finxol.io
SSH Key Fingerprint:
SHA256:olFE3asYdoBMScuJOt60UxXdJ0RFdGv5kVKrdOtIcPI=
+3
-1
2 changed files
expand all
collapse all
unified
split
src
config.ts
pages
[...others].astro
+1
src/config.ts
···
1
1
export const config = {
2
2
+
defaultLocale: "fr",
2
3
domains: {
3
4
fr: "https://staging.colinozanne.fr",
4
5
en: "https://staging.colinozanne.co.uk",
+2
-1
src/pages/[...others].astro
···
1
1
---
2
2
+
import { config } from "@/config.ts";
2
3
const url = Astro.url;
3
4
4
4
-
url.pathname = "/fr" + url.pathname;
5
5
+
url.pathname = `/${config.defaultLocale}${url.pathname}`;
5
6
6
7
return Astro.redirect(url.href);
7
8
---