Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions 2025/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ export default defineConfig({
serializeConfig: true,
},

redirects: {
'/': '/2025/ja',
'/2025': '/2025/ja',
},

vite: {
optimizeDeps: {
exclude: [
Expand Down
File renamed without changes.
10 changes: 8 additions & 2 deletions 2025/src/components/LanguagePicker.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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];
---
Expand All @@ -13,7 +19,7 @@ const currentLang = pathname.split('/')[1];
{lang.toUpperCase()}
</a>
{i < languages.length - 1 && <span class="separator">/</span>}
</>
</>
))}
</div>

Expand Down
6 changes: 4 additions & 2 deletions 2025/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -16,7 +17,8 @@ const ogImageUrl = ufo.joinURL(BASE_URL, 'og.png');
<!DOCTYPE html>
<html lang={lang}>
<head>
<meta charset="utf-8" />
<slot name="header" />
<meta charset="utf-8" />
<GoogleFontsOptimizer url="https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400&display=swap" />
<SEO
{title}
Expand All @@ -37,7 +39,7 @@ const ogImageUrl = ufo.joinURL(BASE_URL, 'og.png');
image: ogImageUrl,
}}
extend={{
link: [{ rel: 'icon', href: '/favicon.ico' }],
link: [{ rel: 'icon', href: favicon }],
}}
/>
</head>
Expand Down
8 changes: 8 additions & 0 deletions 2025/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
import Layout from '@/layouts/Layout.astro';
---
<Layout>
<Fragment slot="header">
<meta http-equiv="refresh" content="0;url=/2025/ja" />
</Fragment>
</Layout>