How to add a note
StableRunning it locally
Install dependencies with pnpm install, then start the development server
with pnpm dev. The site serves on http://localhost:3000. Content changes
hot-reload; changes to _meta.ts occasionally need a restart.
Adding a page
- Create an
.mdxfile in the right section folder undercontent/. - Give it frontmatter with a
titleand adescription. The description is what search engines and the card grids show, so write a real sentence. - Put
<Status kind="stub" />immediately under the heading, and raise it as the page matures. - Add the file to that folder’s
_meta.tsin the position you want it in the sidebar. A file missing from_meta.tsstill renders, but it lands at the end of the sidebar in filesystem order, which is never what you want.
The lab-first workflow
A topic does not start as a section page. It starts as a note.
Writing directly into a section page produces confident prose about something half-understood. Writing into the lab first produces a note with its uncertainty still attached, which is the honest state of most new material.
Before committing
Run all three checks and let each one pass before the next.
| Check | Command | Catches |
|---|---|---|
| Types | pnpm typecheck | Errors in components and _meta.ts files |
| Lint | pnpm lint | Style violations, configured to fail on any warning |
| Build | pnpm build | MDX that does not compile, and broken component usage |
Then check that no credential, token or key has crept into a file. Nothing here needs a secret, so anything that looks like one is a mistake.
Last updated on