TenantAtlas/apps/website/astro.config.mjs
ahmido b9c128163b feat: public website launch readiness updates (#394)
## Summary
- apply public website launch readiness updates across the Astro site shell, content, and navigation
- refine website components, metadata, and localization-related structure for launch prep
- update docs/content paths and smoke coverage to match the launch-ready public site state

## Scope
- touches the website app and related spec artifacts for feature 403
- does not modify `apps/platform`

## Testing
- not run in this step

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #394
2026-05-21 21:41:33 +00:00

107 lines
3.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/',
'/en/product/',
'/en/products/',
'/en/services/',
'/en/blog/',
'/en/insights/',
]);
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: 'Evaluierungsleitfaeden',
translations: {
en: 'Evaluation Guides',
},
items: [{ autogenerate: { directory: 'guides' } }],
},
{
label: 'Plattform-Notizen',
translations: {
en: 'Platform Notes',
},
items: [
{ label: 'Evidence Review', link: 'platform/evidence-review/' },
],
},
],
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()],
},
});