--- import { ClientRouter } from 'astro:transitions'; import Header from '../components/Header.astro'; import Footer from '../components/Footer.astro'; import SearchModal from '../components/SearchModal.astro'; import { url } from '../lib/url'; import { serialize, type JsonLd } from '../lib/jsonld'; import '../styles/app.css'; import { PALETTES, DEFAULT_PALETTE } from '../lib/palettes'; // Preload the two faces that paint above the fold — the wordmark in the // masthead and the DM Mono the masthead/labels use — so the header does not flash // its fallback on first paint. The rest load on demand via @font-face. import notoWordmark from '../fonts/noto-sans-display-var-latin.woff2'; import dmMono from '../fonts/dm-mono-400.woff2'; interface Props { title?: string; description?: string; railless?: boolean; /** schema.org objects for this page; see src/lib/jsonld.ts */ jsonLd?: JsonLd | JsonLd[]; } const { jsonLd, title = 'DÆMONBins — the Off-the-Land Almanac', description = 'One filterable catalog merging GTFOBins, LOLBAS, WADComs and LOOBins — plus DÆMON additions. Living-off-the-land and offensive techniques by platform, access, environment and evidence state.', } = Astro.props; // Canonical = site origin + slash-less path (`trailingSlash: 'never'` in // astro.config.mjs; vercel.json 308s `/x/` → `/x`, so a slashed canonical // would point every page at a redirect). Only `/` keeps its slash. const canonical = new URL(Astro.url.pathname.replace(/(.)\/$/, '$1'), Astro.site).href; // Social card: crawlers need an absolute URL and a raster — the PNG is rendered // from the SVG template by `npm run og` (scripts/og.mjs) and committed. const ogImage = new URL('og.png', Astro.site).href; // The pre-paint script's table: palette → browser-chrome colour per mode. const CHROME = Object.fromEntries(PALETTES.map((p) => [p.id, p.chrome])); ---