Adds the footer, back-to-top button, skip link, placeholder routes, 404 and error pages inside the shell, plus per-page SEO from a single page registry (canonical URLs, Open Graph image, JSON-LD, generated sitemap.xml and robots.txt). Theme tokens and recipes replace repeated styling, the hero loads only the active and neighbouring slides, and the e-mail address is joined in the browser to keep it out of the HTML and bundle. Adds Vitest with property-based (fast-check) and axe tests, ESLint, security headers for dev and preview, Lighthouse CI and a `pnpm check` script that runs all quality gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
684 B
TypeScript
21 lines
684 B
TypeScript
import type { Plugin } from 'vite';
|
|
import { siteUrl } from '../src/seo.ts';
|
|
import sitePages, { pageList } from '../src/sitePages.ts';
|
|
import { sitemapXml } from '../src/sitemap.ts';
|
|
|
|
// Maakt bij elke build dist/sitemap.xml uit het pagina-register. Route-heads
|
|
// lezen hetzelfde register, dus sitemap en noindex lopen nooit uit elkaar.
|
|
export default function sitemapPlugin(): Plugin {
|
|
return {
|
|
name: 'slp-sitemap',
|
|
apply: 'build',
|
|
generateBundle() {
|
|
this.emitFile({
|
|
type: 'asset',
|
|
fileName: 'sitemap.xml',
|
|
source: sitemapXml(pageList(sitePages), siteUrl),
|
|
});
|
|
},
|
|
};
|
|
}
|