Files
cameleer-website/astro.config.mjs
hsiegeln 77bf0bfa74 feat(hero): rotate three positioning lines on a 10s cycle
All three lines render in the DOM; CSS drives the fade via data-active.
Reduced-motion users see the first line only (no interval, no fade).
Rotation pauses on hover and keyboard focus. aria-live=off on the
rotator so AT does not announce every swap; aria-hidden flips per-swap
to avoid duplicate heading announcements.

Also set vite.build.assetsInlineLimit=0 in astro.config.mjs so Astro
emits the rotator script as a same-origin external file (dist/assets/)
rather than inlining it — required for CSP script-src 'self' compliance.
2026-04-24 23:46:21 +02:00

30 lines
929 B
JavaScript

import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
export default defineConfig({
site: 'https://www.cameleer.io',
output: 'static',
trailingSlash: 'ignore',
build: {
// 'directory' outputs <page>/index.html so extensionless URLs like /pricing
// resolve natively under Apache without MultiViews or rewrite rules.
format: 'directory',
assets: 'assets',
inlineStylesheets: 'auto',
},
compressHTML: true,
integrations: [
tailwind({ applyBaseStyles: false }),
],
vite: {
build: {
cssMinify: 'lightningcss',
// Prevent Astro from inlining small scripts into the HTML.
// Without this, the hero rotator script (< 4 KB) gets inlined as a
// <script type="module"> tag, which violates CSP script-src 'self'
// (no 'unsafe-inline'). Setting 0 forces all scripts to external files.
assetsInlineLimit: 0,
},
},
});