-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(i18n): domain with lookup table
- Loading branch information
Showing
18 changed files
with
219 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/astro/test/fixtures/i18n-routing-subdomain/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { defineConfig} from "astro/config"; | ||
|
||
export default defineConfig({ | ||
trailingSlash: "never", | ||
experimental: { | ||
i18n: { | ||
defaultLocale: 'en', | ||
locales: [ | ||
'en', 'pt', 'it' | ||
], | ||
domains: { | ||
pt: "https://example.pt" | ||
}, | ||
routingStrategy: "domain" | ||
}, | ||
|
||
}, | ||
base: "/new-site" | ||
}) |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/i18n-routing-subdomain/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@test/i18n-routing-subdomain", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"astro": "workspace:*" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/en/blog/[id].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
export function getStaticPaths() { | ||
return [ | ||
{params: {id: '1'}, props: { content: "Hello world" }}, | ||
{params: {id: '2'}, props: { content: "Eat Something" }}, | ||
{params: {id: '3'}, props: { content: "How are you?" }}, | ||
]; | ||
} | ||
const { content } = Astro.props; | ||
--- | ||
<html> | ||
<head> | ||
<title>Astro</title> | ||
</head> | ||
<body> | ||
{content} | ||
</body> | ||
</html> |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/en/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<title>Astro</title> | ||
</head> | ||
<body> | ||
Hello | ||
</body> | ||
</html> |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/en/start.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<title>Astro</title> | ||
</head> | ||
<body> | ||
Start | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/pt/blog/[id].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
export function getStaticPaths() { | ||
return [ | ||
{params: {id: '1'}, props: { content: "Hola mundo" }}, | ||
{params: {id: '2'}, props: { content: "Eat Something" }}, | ||
{params: {id: '3'}, props: { content: "How are you?" }}, | ||
]; | ||
} | ||
const { content } = Astro.props; | ||
--- | ||
<html> | ||
<head> | ||
<title>Astro</title> | ||
</head> | ||
<body> | ||
{content} | ||
</body> | ||
</html> |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/pt/start.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<title>Astro</title> | ||
</head> | ||
<body> | ||
Oi essa e start | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.