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:
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user