diff --git a/2025/astro.config.mjs b/2025/astro.config.mjs index fca14518..9fb6f6f3 100644 --- a/2025/astro.config.mjs +++ b/2025/astro.config.mjs @@ -12,11 +12,6 @@ export default defineConfig({ serializeConfig: true, }, - redirects: { - '/': '/2025/ja', - '/2025': '/2025/ja', - }, - vite: { optimizeDeps: { exclude: [ diff --git a/2025/public/favicon.ico b/2025/src/assets/favicon.ico similarity index 100% rename from 2025/public/favicon.ico rename to 2025/src/assets/favicon.ico diff --git a/2025/src/components/LanguagePicker.astro b/2025/src/components/LanguagePicker.astro index d3432d96..69c6b023 100644 --- a/2025/src/components/LanguagePicker.astro +++ b/2025/src/components/LanguagePicker.astro @@ -2,7 +2,13 @@ // @ts-expect-error not found import { base } from 'astro:config/client'; -const languages = Object.keys(import.meta.glob('../pages/*.astro')).map(p => p.split('/').at(-1)!.replace('.astro', '')).sort(); +const languages + = Object.keys(import.meta.glob('../pages/*.astro')) + .map(p => p.split('/') + .at(-1)! + .replace('.astro', '')) + .filter(lang => lang !== 'index') + .sort(); const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, ''); const currentLang = pathname.split('/')[1]; --- @@ -13,7 +19,7 @@ const currentLang = pathname.split('/')[1]; {lang.toUpperCase()} {i < languages.length - 1 && /} - > +> ))} diff --git a/2025/src/layouts/Layout.astro b/2025/src/layouts/Layout.astro index 418dca95..49e039f7 100644 --- a/2025/src/layouts/Layout.astro +++ b/2025/src/layouts/Layout.astro @@ -1,4 +1,5 @@ --- +import favicon from '@/assets/favicon.ico?url'; import Footer from '@/components/Footer.astro'; import Header from '@/components/Header.astro'; import { BASE_URL } from '@/consts'; @@ -16,7 +17,8 @@ const ogImageUrl = ufo.joinURL(BASE_URL, 'og.png');
- +