Rebuild du site sur Astro : i18n multilingue, faits verifies, Docker, CI, tests
- Astro statique, EN par defaut + /fr/ + /nl/, detection langue navigateur - i18n par fichiers JSON, ajouter une langue = ajouter des traductions - Contenu original porte a l'identique (diff d'inventaire par langue) - Chronologie legislative corrigee sur sources primaires (PE, Conseil, votes) - Timeline 23 precedents + observatoire 35 items + annuaire 66 outils FOSS, chaque affirmation verifiee et sourcee - Zero requete tierce (teste), lisible JS coupe, axe WCAG AA x2 themes - Version offline monofichier par langue a chaque build - Docker multi-stage vers nginx + CSP stricte auto-generee - CI GitHub Actions (SHA-pinnees) + verification hebdo des liens - CONTRIBUTING : divulgation d'affiliation obligatoire, allowlist de domaines testee en CI
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config'
|
||||
import mdx from '@astrojs/mdx'
|
||||
import sitemap from '@astrojs/sitemap'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { defaultLocale, locales } from './src/i18n/locales'
|
||||
|
||||
// Static multilingual guide. `/` is English (canonical); every other
|
||||
// locale in src/i18n/config.ts gets a full prerendered translation at
|
||||
// /<lang>/ — no dual-language DOM, no runtime language CSS toggling.
|
||||
// The whole site must stay readable with JS off.
|
||||
export default defineConfig({
|
||||
site: 'https://exitchatcontrol.org',
|
||||
output: 'static',
|
||||
trailingSlash: 'ignore',
|
||||
build: {
|
||||
// keep every stylesheet external so the CSP can stay `style-src 'self'`
|
||||
// (inline <style> would need per-build hashes)
|
||||
inlineStylesheets: 'never',
|
||||
},
|
||||
i18n: {
|
||||
defaultLocale,
|
||||
locales: [...locales],
|
||||
routing: {
|
||||
prefixDefaultLocale: false,
|
||||
},
|
||||
},
|
||||
integrations: [
|
||||
mdx(),
|
||||
sitemap({
|
||||
i18n: {
|
||||
defaultLocale,
|
||||
locales: Object.fromEntries(locales.map((l) => [l, l])),
|
||||
},
|
||||
}),
|
||||
],
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user