-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
880 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ pnpm-debug.log* | |
|
||
# macOS-specific files | ||
.DS_Store | ||
|
||
# i18n | ||
astro_tmp_pages_* |
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 @@ | ||
import type { AstroI18nextConfig } from "@/../../node_modules/astro-i18next"; | ||
|
||
const config: AstroI18nextConfig = { | ||
defaultLocale: "ja", | ||
locales: ["ja", "en"], | ||
}; | ||
|
||
export default config; |
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 |
---|---|---|
@@ -1,23 +1,59 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import react from "@astrojs/react"; | ||
import tailwind from "@astrojs/tailwind"; | ||
import cloudflare from "@astrojs/cloudflare"; | ||
import partytown from '@astrojs/partytown'; | ||
import { defineConfig } from "astro/config" | ||
import react from "@astrojs/react" | ||
import tailwind from "@astrojs/tailwind" | ||
import cloudflare from "@astrojs/cloudflare" | ||
import partytown from "@astrojs/partytown" | ||
import astroI18next from "astro-i18next" | ||
import { i18n, filterSitemapByDefaultLocale } from "astro-i18n-aut/integration" | ||
import sitemap from "@astrojs/sitemap" | ||
|
||
const defaultLocale = "ja" | ||
const locales = { | ||
ja: "ja", // the `defaultLocale` value must present in `locales` keys | ||
en: "en", | ||
} | ||
|
||
// https://astro.build/config | ||
/** @type {import('tailwindcss').Config} */ | ||
export default defineConfig({ | ||
base: "/", | ||
site: "https://skyshare.uk/", | ||
server: { | ||
port: 4321, | ||
host: true | ||
}, | ||
integrations: [ | ||
react(), | ||
tailwind(), | ||
partytown() | ||
], | ||
output: "hybrid", | ||
adapter: cloudflare(), | ||
}); | ||
base: "/", | ||
site: "https://skyshare.uk/", | ||
server: { | ||
port: 4321, | ||
host: true, | ||
}, | ||
integrations: [ | ||
react(), | ||
tailwind(), | ||
partytown(), | ||
astroI18next(), | ||
i18n({ | ||
locales, | ||
defaultLocale, | ||
}), | ||
sitemap({ | ||
i18n: { | ||
locales, | ||
defaultLocale, | ||
}, | ||
filter: filterSitemapByDefaultLocale({ defaultLocale }), | ||
}), | ||
], | ||
output: "hybrid", | ||
adapter: cloudflare(), | ||
// 不要? | ||
// i18n: { | ||
// defaultLocale: "ja", | ||
// locales: ["ja", "en"], | ||
// fallback: ["ja", "en"], | ||
// }, | ||
trailingSlash: "always", | ||
build: { | ||
format: "directory", | ||
}, | ||
routing: { | ||
prefixDefaultLocale: true, | ||
}, | ||
}) | ||
|
||
import { defineConfig } from "astro/config" |
Oops, something went wrong.