Implements website feature branch `410-public-docs-ia`. Target branch: `website-dev`. Validation: - `corepack pnpm --filter @tenantatlas/website build` - Playwright smoke coverage for public routes and docs interactions - Static claim scans for `apps/website/src`, `apps/website/public`, and `apps/website/dist` Follow-up integration path after merge: `website-dev` -> `dev`. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #412
142 lines
4.0 KiB
JavaScript
142 lines
4.0 KiB
JavaScript
import { defineConfig } from 'astro/config';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import sitemap from '@astrojs/sitemap';
|
|
import starlight from '@astrojs/starlight';
|
|
|
|
import mdx from '@astrojs/mdx';
|
|
|
|
const redirectOnlyPaths = new Set([
|
|
'/product/',
|
|
'/products/',
|
|
'/services/',
|
|
'/blog/',
|
|
'/insights/',
|
|
'/welcome-to-docs/',
|
|
'/guides/intro/',
|
|
'/guides/getting-started/',
|
|
'/guides/first-project-checklist/',
|
|
'/platform/evidence-review/',
|
|
'/en/product/',
|
|
'/en/products/',
|
|
'/en/services/',
|
|
'/en/blog/',
|
|
'/en/insights/',
|
|
'/en/welcome-to-docs/',
|
|
'/en/guides/intro/',
|
|
'/en/guides/getting-started/',
|
|
'/en/guides/first-project-checklist/',
|
|
'/en/platform/evidence-review/',
|
|
]);
|
|
|
|
const isRedirectOnlySitemapPath = page => {
|
|
const pathname = page.startsWith('http') ? new URL(page).pathname : page;
|
|
const normalized = pathname.endsWith('/') ? pathname : `${pathname}/`;
|
|
|
|
return redirectOnlyPaths.has(normalized);
|
|
};
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
devToolbar: {
|
|
enabled: false,
|
|
},
|
|
// https://docs.astro.build/en/guides/images/#authorizing-remote-images
|
|
site: process.env.PUBLIC_SITE_URL ?? 'https://tenantial.com',
|
|
image: {
|
|
domains: ['images.unsplash.com'],
|
|
},
|
|
prefetch: true,
|
|
integrations: [
|
|
sitemap({
|
|
filter: page => !isRedirectOnlySitemapPath(page),
|
|
i18n: {
|
|
defaultLocale: 'de',
|
|
locales: {
|
|
de: 'de',
|
|
en: 'en',
|
|
},
|
|
},
|
|
}),
|
|
starlight({
|
|
title: 'Tenantial Docs',
|
|
// https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG.md
|
|
// If no Astro and Starlight i18n configurations are provided, the built-in default locale is used in Starlight and a matching Astro i18n configuration is generated/used.
|
|
// If only a Starlight i18n configuration is provided, an equivalent Astro i18n configuration is generated/used.
|
|
// If only an Astro i18n configuration is provided, the Starlight i18n configuration is updated to match it.
|
|
// If both an Astro and Starlight i18n configurations are provided, an error is thrown.
|
|
locales: {
|
|
root: {
|
|
label: 'Deutsch',
|
|
lang: 'de',
|
|
},
|
|
en: {
|
|
label: 'English',
|
|
lang: 'en',
|
|
},
|
|
},
|
|
// https://starlight.astro.build/guides/sidebar/
|
|
sidebar: [
|
|
{
|
|
label: 'Dokumentationsstart',
|
|
translations: {
|
|
en: 'Documentation Start',
|
|
},
|
|
items: ['docs', 'docs/getting-started', 'docs/evaluation-pilot'],
|
|
},
|
|
{
|
|
label: 'Provider & Zugriff',
|
|
translations: {
|
|
en: 'Provider & Access',
|
|
},
|
|
items: [
|
|
'docs/microsoft-365-provider',
|
|
'docs/permissions-data-access',
|
|
'docs/data-processing-trust',
|
|
],
|
|
},
|
|
{
|
|
label: 'Evidence & Recovery',
|
|
translations: {
|
|
en: 'Evidence & Recovery',
|
|
},
|
|
items: [
|
|
'docs/policy-evidence',
|
|
'docs/drift-detection',
|
|
'docs/backups-versioning-recovery',
|
|
'docs/findings-exceptions-accepted-risk',
|
|
],
|
|
},
|
|
{
|
|
label: 'Review & Grenzen',
|
|
translations: {
|
|
en: 'Review & Boundaries',
|
|
},
|
|
items: [
|
|
'docs/review-packs-decisions',
|
|
'docs/known-limitations',
|
|
'docs/faq',
|
|
],
|
|
},
|
|
],
|
|
social: [],
|
|
disable404Route: true,
|
|
customCss: ['./src/assets/styles/starlight.css'],
|
|
favicon: '/favicon.ico',
|
|
components: {
|
|
SiteTitle: './src/components/ui/starlight/SiteTitle.astro',
|
|
Head: './src/components/ui/starlight/Head.astro',
|
|
MobileMenuFooter:
|
|
'./src/components/ui/starlight/MobileMenuFooter.astro',
|
|
ThemeSelect: './src/components/ui/starlight/ThemeSelect.astro',
|
|
},
|
|
}),
|
|
mdx(),
|
|
],
|
|
experimental: {
|
|
clientPrerender: true,
|
|
},
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
},
|
|
});
|