Skip to content

Docs/redesign - #14

Merged
monarcode merged 2 commits into
mainfrom
docs/redesign
Nov 23, 2026
Merged

monarcode merged 2 commits into
mainfrom
docs/redesign

Conversation

@monarcode

Copy link
Copy Markdown
Owner

Redesign the docs site: landing page and docs pages

Landing page (/)

The page is laid out like a type foundry's specimen sheet. Instead of a font, it shows one Effetch call's inferred type, Effect<value, errors, never>, at display size.

  • Hero: switches for the call's options (output, error, retry, timeout) and four preset instances change the type live. Members that leave thin out and members that join thicken in. A caption explains what each change did, and the compiled call is shown underneath.
  • Sections:
    • The same request, two signatures: HttpClient alone next to Effetch, with each type's errors explained.
    • The path is a type: pick a path; the parameter names TypeScript reads from it are shown, along with a call that compiles and the error a wrong call gets.
    • Every failure has a name: a slider narrows the error type as errors are handled.
    • Specifications, then the closing call to action.
  • Every type shown is real: each type and compiler error on the page is compiled at build time with Twoslash from site/landing/*.ts, and src/lib/landing.ts fails the build if an example stops matching.
  • Accessibility: the switches and presets work by keyboard and focus shows as a lime outline. With reduced motion on, changes snap with no animation.

Docs pages (/docs/*)

  • Frame: the landing page's header now runs full width over the docs, using Fumadocs' notebook layout with a custom header slot. It keeps the slot's sticky position, header height and the phone menu button.
  • Restyle: src/styles/docs.css restyles Fumadocs' parts without changing their layout. It gives:
    • square corners and 1px divider lines, with no fills or shadows
    • a lime dot beside the current page in the sidebar
    • a page heading area closed off by a line
    • paragraphs capped at 68 characters per line, and a line above each section heading
    • links in white on a lime underline, and inline code in an outlined box
  • Code: examples and type tables use the landing's greys instead of a syntax theme (effetch-ink in mdx-options.ts). Code blocks show in full height, so long examples aren't clipped.
  • Components:
    • Notes are outlined boxes with an icon and label, and no coloured side bar (components/docs/callout.tsx).
    • Previous/next are rows with the full description, not cards (components/docs/footer.tsx).
    • Type pop-ups, search, the phone menu and the contents menu match the rest.
  • 404 page: rebuilt in the landing page's style.
  • Shared tokens: Fumadocs' colour variables are set to the site's tokens, its corner radii to 0, and its mono font to Recursive. Every place Fumadocs blended lime with transparency now uses the exact colour.

Set one Effetch call's signature at display size in Recursive, with the
call's options and the client's plugins as switches; each of its 16
combinations is a compiled Twoslash result. Follow it with the HttpClient
comparison, typed paths (the parameter names TypeScript reads from a path,
and the compiler's error for a wrong call), the narrowing slider, a
specifications table, and DESIGN.md.
- Put the landing masthead over the docs and restyle the pages in docs.css
- Set code blocks and type tables in the landing's grey code roles
- Replace the callout, previous/next and 404 page, and refresh DESIGN.md
@monarcode
monarcode merged commit 2fce452 into main Nov 23, 2026
4 checks passed
@monarcode
monarcode deleted the docs/redesign branch November 23, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant