Files
armarium-website/astro.config.mjs
T
Daniel Krähenbühl d668aa0fdf feat: Armarium full customization and 4-language i18n (v0.8.0)
Replaces Astro Rocket demo content with Armarium branding and adds
complete DE/FR/IT/EN translations across all pages.

Branding & content (v0.7.0):
- Add horizontal SVG logo to navbar with currentColor dark mode support
- Rewrite homepage with Armarium hero, 6 feature cards, trust bar,
  Zürich coat of arms SVG, and CTA; shared HomePage.astro component
- Add privacy page (/datenschutz) with 6 Infomaniak certification cards
  and 8-section policy (ISO 27001:2022, Swiss Hosting, nDSG/GDPR, etc.)
- Add legal notice page (/impressum)
- Rewrite about, contact, 404 pages with Armarium content
- Add features page (/projects) from projects content collection
- Add language switcher dropdown (LanguageSwitcherDropdown.astro)
- Add single launch blog post; remove all demo blog/project content
- Set up i18n foundation: astro.config.mjs, ui.ts, utils.ts

Full i18n (v0.8.0):
- Add all pages in FR/IT/EN: about, contact, blog, features, privacy,
  legal notice — 28 locale variants total
- Language switcher visible in every layout (PageLayout, BlogLayout,
  ProjectLayout, LandingLayout) with translated nav items
- Locale-aware nav and footer hrefs via nav.*.href keys in ui.ts
- Shared page components (AboutPage, ContactPage, FeaturesIndexPage,
  BlogIndexPage) accept locale prop; locale pages are 4-line wrappers
- Extend content.config.ts locale enum with de and it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 21:51:21 +02:00

67 lines
2.1 KiB
JavaScript

import { defineConfig, envField } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import react from '@astrojs/react';
import icon from 'astro-icon';
import tailwindcss from '@tailwindcss/vite';
import vercel from '@astrojs/vercel';
import netlify from '@astrojs/netlify';
const isNetlify = process.env.DEPLOY_TARGET === 'netlify';
export default defineConfig({
adapter: isNetlify ? netlify() : vercel(),
site: process.env.SITE_URL || 'https://example.com',
env: {
schema: {
SITE_URL: envField.string({ context: 'server', access: 'public', optional: true }),
PUBLIC_GA_MEASUREMENT_ID: envField.string({ context: 'client', access: 'public', optional: true }),
PUBLIC_GTM_ID: envField.string({ context: 'client', access: 'public', optional: true }),
RESEND_API_KEY: envField.string({ context: 'server', access: 'secret', optional: true }),
RESEND_FROM_EMAIL: envField.string({ context: 'server', access: 'secret', optional: true }),
NEWSLETTER_API_KEY: envField.string({ context: 'server', access: 'secret', optional: true }),
GOOGLE_SITE_VERIFICATION: envField.string({ context: 'server', access: 'public', optional: true }),
BING_SITE_VERIFICATION: envField.string({ context: 'server', access: 'public', optional: true }),
PUBLIC_GOOGLE_MAPS_API_KEY: envField.string({ context: 'client', access: 'public', optional: true, default: '' }),
PUBLIC_CONSENT_ENABLED: envField.boolean({ context: 'client', access: 'public', optional: true, default: false }),
PUBLIC_PRIVACY_POLICY_URL: envField.string({ context: 'client', access: 'public', optional: true, default: '' }),
},
},
image: {
layout: 'constrained',
},
integrations: [
react(),
mdx(),
sitemap(),
icon(),
],
vite: {
plugins: [tailwindcss()],
},
i18n: {
defaultLocale: 'de',
locales: ['de', 'fr', 'it', 'en'],
routing: {
prefixDefaultLocale: false,
},
},
security: {
checkOrigin: true,
},
markdown: {
shikiConfig: {
theme: 'github-dark',
wrap: true,
},
},
});