Files
adr-sml/astro.config.mjs
T
Pouya LajevardiandClaude Opus 5 8134709548 feat: build step 1 — scaffold, layout, header, footer, SEO; zero JavaScript
Build order step 1 (docs/01): scaffold, tokens, base layout, header,
footer, SEO component, plus a temporary /type-scale/ proof sheet that
step 2 deletes.

THE FONTS WERE NEVER ON DISK. global.css declared six @font-face rules
pointing at /fonts/*.woff2 and public/fonts/ did not exist, so every
face had been silently falling back to Georgia and the system sans.
Six cuts committed, 123,804 bytes, SIL OFL 1.1, provenance in
docs/reference/fonts-provenance.md. ?v=1 on every URL because the
deploy script serves them immutable for a year.

ZERO JAVASCRIPT. The reveal was an inline IntersectionObserver in
<head>; docs/05 specifies script-src 'self' with no unsafe-inline, so
the only script on the site was the one thing the site's own CSP would
refuse to execute. Replaced with animation-timeline: view() behind
@supports. 0 script tags and 0 .js files in dist.

The infinity mark is lifted verbatim from the deployed site's own
smlMark loading thumbnail, not redrawn (Q32 asks whether a canonical
vector exists). The proof sheet computes its contrast table from
tokens.css rather than restating docs/02 — all eleven ratios reproduce
the measured table exactly.

Register: Canadian Tax Foundation added (§4, R10 widened); Q30 closed
— SML Company Ltd is federally incorporated under the CBCA, and the
footer publishes neither that nor the place of business; Q31 closed —
Plausible, on EU-only data residency (D15 amended). ROLE constants
added for "Director of Firm Operations" and "active litigation
exposure" so step 3 does not hand-type them.

Lighthouse unavailability now stated in six places rather than left as
a control that had silently stopped existing (§7, R11).

Both review agents ran twice. The second pass found four defects in
the first pass's fixes, including the minifier bug written back into
its own fix and a colour-alone repair that used the banned gold-on-
cream pairing at 2.10:1. Measured in headless Chrome at thirteen
widths with a seventh nav item injected: 0 overflow, 0 tap targets
under 44x44, 0 focus-order inversions, state indicators at 12.29:1,
755 words of body text with no JavaScript.

Opened: Q32-Q37. Closed: Q30, Q31.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XquaEq4BgWMCwUqLEyNkF
2026-08-26 15:57:02 -04:00

58 lines
2.7 KiB
JavaScript

import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
// Canonical origin. Drives canonical URLs, OG tags, and the sitemap.
const SITE = process.env.PUBLIC_SITE_URL ?? 'https://adr.smlcompany.ca';
export default defineConfig({
site: SITE,
// Static output is the point of this rebuild — see docs/04-seo-spec.md.
// Do not switch to a server adapter without an AGENTS.md Change Log entry.
output: 'static',
// Directory-style URLs with a trailing slash, matched by the CloudFront
// trailing-slash function. See docs/06-deployment.md.
trailingSlash: 'always',
build: { format: 'directory', inlineStylesheets: 'auto' },
// Astro 7 changed this default from `true` to `'jsx'`. Measured, not assumed
// (AGENTS.md entry (t)): in an .astro template, an inline pair split across
// two lines renders as `<em>inline</em><strong>pair</strong>` under 'jsx' and
// `<em>inline</em> <strong>pair</strong>` under `true`. The space is silently
// deleted — no error, no warning; you find out by reading the page.
//
// MDX prose is NOT affected either way; the hazard is .astro markup only.
// Held at the HTML-aware behaviour because hand-written templates on a
// text-heavy site are exactly where a wrapped line meets an inline tag.
// Revisit only with a measurement, not a preference. See R12.
compressHTML: true,
integrations: [
mdx(),
sitemap({
// /legal/* is noindex by spec (docs/04). /type-scale/ is the temporary
// step-1 proof sheet — delete this half of the condition with the page.
filter: (page) =>
!page.includes('/legal/') && !page.includes('/type-scale/'),
changefreq: 'monthly',
// No `lastmod`. It was `new Date()`, which stamped every URL with the
// build time — telling crawlers all 17 pages changed whenever one did.
// Google discounts lastmod it judges unreliable, so that spent the signal
// docs/04-seo-spec.md wants rather than sending it. Step 7 can reinstate
// it per-entry from an article's `updatedDate` via `serialize`.
}),
],
// No `image` block: `astro/assets/services/sharp` is already Astro's default
// service, so setting it was dead configuration. The conventions it used to
// sit under — explicit width/height on every image, never base64-inline —
// live in CLAUDE.md, which is where they are actually enforced (by review).
// No `prefetch` block at all — removed 2026-08-26, see AGENTS.md entry (r).
// Any prefetch setting ships Astro's prefetch script to every page, against
// CLAUDE.md's "default to zero JS", for a marginal gain on a small static site
// already served from CloudFront. Revisit only against real Lighthouse numbers.
});