behind the Hideout

Typography

Four families, each with one job. Everything below is set in the real fonts Halo Syahrul loads, at the sizes it uses.

Families

Loaded with next/font/google in src/modules/Root.layout.tsx, so they are self-hosted at build time and there is no request to Google from the browser. Only the weights listed are shipped.
  • Plus Jakarta Sansfont-sans

    Body text, UI, buttons. The default on <body>.

    Aa Gg 123
    The quick brown fox jumps over the lazy dog.
    • 400
    • 500
    • 600
    • 700
    var(--font-plus-jakarta-sans)
  • Space Groteskfont-display / font-serif

    Headings, card titles, table headers in posts.

    Aa Gg 123
    The quick brown fox jumps over the lazy dog.
    • 500
    • 600
    • 700
    var(--font-space-grotesk)
  • JetBrains Monofont-mono

    Labels, dates, chips, paths, code and the terminal.

    Aa Gg 123
    The quick brown fox jumps over the lazy dog.
    • 400
    • 500
    var(--font-jetbrains-mono)
  • Caveatfont-hand

    Hand-written accents only: eyebrows, stickers, a sign-off. Never a paragraph.

    Aa Gg 123
    The quick brown fox jumps over the lazy dog.
    • 600
    var(--font-caveat)

Scale

Not a token file: these are the class strings in the components. Resize the window, the md: steps kick in at 768px.
  • page title
    DocsShell, About, Blog list
    Notes from the hideout
    font-display text-4xl font-bold tracking-tight md:text-[52px] md:leading-[1.08]
  • section title
    DocsSection
    Notes from the hideout
    font-display text-2xl font-bold tracking-tight md:text-[32px]
  • card title
    cards, post list
    Notes from the hideout
    font-display text-xl font-bold
  • lead
    page descriptions
    Notes from the hideout
    text-base text-muted md:text-lg
  • body
    everything else
    Notes from the hideout
    text-base
  • small
    card text, meta
    Notes from the hideout
    text-sm text-muted
  • label
    dates, paths, chips
    Notes from the hideout
    font-mono text-xs text-muted
  • eyebrow
    above a page title
    Notes from the hideout
    font-hand text-[24px] leading-none text-brand

Post body

Posts render inside prose prose-sm sm:prose-base parser (ContentParser). The parser class in content-parser.css binds the typography plugin colours to the theme and sets headings in Space Grotesk.

Why the build is static

Every post is compiled once with mdx-bundler, at build time. There is no server rendering a page per request, so a page is just a file. mdx-bundler, output: 'export', generateStaticParams.

The cheapest request is the one that hits a CDN.

  • one HTML file per post and language
  • one OG image per post, also static

What it costs

A typo fix needs a rebuild. That is the trade.