feat: scaffold Astro project with en/fr i18n routing

Sets output to static (Astro default) with path-based i18n routing
(/en/, /fr/) and no unprefixed default-locale route, per the hub
landing page design spec.
This commit is contained in:
2026-08-02 15:50:28 +02:00
parent a29cb5e984
commit e9d34f9d13
15 changed files with 4903 additions and 97 deletions
+15
View File
@@ -0,0 +1,15 @@
import { describe, it, expect } from 'vitest';
import { readFileSync, existsSync } from 'node:fs';
describe('locale routing', () => {
it('builds /en/ and /fr/ pages with correct lang attributes', () => {
const en = readFileSync('dist/en/index.html', 'utf-8');
const fr = readFileSync('dist/fr/index.html', 'utf-8');
expect(en).toContain('lang="en"');
expect(fr).toContain('lang="fr"');
});
it('does not build an unprefixed root page', () => {
expect(existsSync('dist/index.html')).toBe(false);
});
});