--- // One subpage of a section (see src/data/section.ts): its number and title, // its lede, its picture, its paragraphs, and the navigation out of it. // Shared by /features/, /architecture/ and /about/'s [slug] routes. // // Position in the section's list is the only source of the number and of // what "previous" and "next" mean, so reordering the data file reorders and // renumbers the pages with it. // // The picture slot takes either an `image` (a file, through astro:assets, // sized from the import so the page does not reflow) or a `diagram` // (mermaid, drawn in the browser). A subpage sets one or the other. // // The breadcrumb is the section's own title behind an arrow and inside // square brackets — `[< about]` — not a sentence built around the title: // any phrasing that reads for one section ("all features") comes out wrong // for the next ("all about"). Square brackets, deliberately not the // guillemet-brackets `⟦…⟧`, which mean "unwritten filler" everywhere else // on this site (see src/data/filler.ts). import { Image } from "astro:assets"; import Diagram from "./Diagram.astro"; import type { Section, Subpage } from "../data/section"; interface Props { page: Subpage; section: Section; /** The section's URL prefix, with both slashes, e.g. "/features/". */ base: string; } const { page, section, base } = Astro.props; const index = section.pages.findIndex((entry) => entry.slug === page.slug); const previous = index > 0 ? section.pages[index - 1] : undefined; const next = index < section.pages.length - 1 ? section.pages[index + 1] : undefined; ---

{index + 1}. {page.title}

{page.lede}

{page.image && (
{page.image.alt}
)} {page.diagram && } {page.body.map((paragraph) =>

{paragraph}

)}