Colophon
How this site works.
A personal site is a good excuse to try the things I’d hesitate to put in front of a client first. Here is what’s under this one, and why.
The stack
For eighteen years this was a WordPress blog on a server I looked after myself. It now runs onEmDash, an open-source CMS built on Astro, deployed as a single Cloudflare Worker. Content lives in D1 (SQLite at the edge), images inR2, and every page is rendered on request and then cached.
The move was scripted: WordPress exported every post, page and attachment, and EmDash’s importer converted the HTML to Portable Text, a structured JSON format for rich text. Every post kept its old address, so nothing anyone linked to in 2012 should 404. The link-log posts got a proper field for the page they point at, and old IFTTT short links were followed to where they really go.
There’s no server to patch and no PHP to update. Publishing still happens in a real editor, at/_emdash/admin, signed in with a passkey.
Search
Press ⌘K anywhere. Search runs on Typesense, an open-source engine that keeps its whole index in memory and is built for search-as-you-type. Every query runs two ways at once:
- By its words. A keyword search that forgives typos and finishes half-typed words, so “mongdb heroku” and “quader” both land where you meant. A match in a title counts four times as much as one in the body.
- By its meaning. Every post is also stored as a vector: 384 numbers that place it by what it’s about, worked out by a small open model (all-MiniLM-L12-v2) running on the search servers themselves. Your query gets the same treatment, so “server ran out of storage” finds the post about running out of disk space with Docker, though it shares almost none of its words.
The two rankings are fused into one, and each result on the search page says which way it was found. Matches by meaning have to be close, too: without a cut-off, even gibberish comes back with the hundred “nearest” posts.
GET /collections/std_content/documents/search
?q=server ran out of storage
&query_by=title,excerpt,tags,categories,body,embedding
&query_by_weights=4,3,2,2,1,1
&vector_query=embedding:([], distance_threshold: 0.65)
# "embedding" in query_by is what makes it hybrid: the query is
# embedded too, and matches by meaning are fused with matches by wordWhere it runs
Typesense runs on three small servers, in Nuremberg, Falkenstein and Helsinki. Each one holds the whole archive, and they agree on every change through Raft, so any one of them can be switched off without search noticing. None of them is on the open internet: each sits behind its own Cloudflare Tunnel, and Cloudflare Access only lets through requests carrying this site’s service token.
When I publish a post, an EmDash hook sends it to Typesense, and unpublishing or deleting takes it out again. If the cluster ever stops answering, search quietly falls back to SQLite’s full-text index inside D1, which is less forgiving but always there. They’re the only part of this site that runs on servers, so they patch themselves and reboot overnight, one at a time.
What gets counted
Typesense keeps a tally of what people search for, and of searches that find nothing, so I can see what’s missing from the archive. A search counts once you stop typing, so the finder’sty, type, typesense count once, as typesense. To tell searchers apart, the site sends Typesense an anonymous id: a keyed hash of your IP address and browser that changes every day. Typesense never sees the address itself, and the tally keeps only the words and how often they were searched.
Clef, and type-safe AI
Most AI writes text. Clef, a model Cloudflare released in October 2026, doesn’t write anything. You give it some state and a set oftyped questions, and it gives back a probability for every allowed answer. It follows the same “System One” API as TypeSafe’s Jev model, and runs on Workers AI, a binding away from this site.
There are three kinds of question:
- noul: yes or no, answered as the probability of yes.
- choice: pick from options you define, with a probability for each.
- score: rate against an ordered rubric, with a probability per level.
Because the model can only ever return one of your options, its output can’t be malformed and can’t invent a blog post that doesn’t exist. This site’s little client carries that guarantee into TypeScript, so the answer type is inferred from the question:
const answer = await decide({
state: { visitor_says: "my Ethereum node keeps running out of disk" },
questions: {
thread: {
type: "choice",
instructions: "Which part of the archive fits best?",
criteria: {
infra: "Servers, Docker, NGINX, nodes",
web3: "Ethereum, NFTs, on-chain art",
frontend: "CSS, JavaScript, responsive design",
},
},
covered: { type: "noul", instructions: "Does the archive cover this?" },
},
});
answer.answers.thread.choice; // "infra" | "web3" | "frontend"
answer.answers.thread.probabilities; // { infra: 0.94, web3: 0.05, frontend: 0.01 }
answer.answers.covered.noul; // 0.81The trick is a conditional type and a const generic, so option keys stay literal:
type AnswerFor<Q> =
Q extends ChoiceQuestion<infer K> ? ChoiceAnswer<K> // K = your option keys
: Q extends ScoreQuestion<infer L> ? ScoreAnswer<L>
: Q extends NoulQuestion ? NoulAnswer // probability of "yes"
: never;
export async function decide<const Qs extends Record<string, Question>>(input: {
state: unknown;
questions: Qs;
}): Promise<{ answers: { [Id in keyof Qs]: AnswerFor<Qs[Id]> } }>The reading compass
The compass on the home page chains two decisions around a search:
- Clef routes your words to one of seven threads in the archive, while FTS5 finds keyword matches.
- Recent posts from the winning thread join the matches, up to 28 candidates.
- Clef picks which candidate you should read first, a probability for each, and separately rates how well the archive covers your question at all.
The probabilities are drawn rather than printed: each one sets the weight of the type on Inter’s variable wght axis, from 150 for unlikely to 900 for certain. The whole thing reads a couple of thousand tokens, takes well under a second, and costs a fraction of a penny, because Clef charges nothing for output.
Reading compass
Not sure where to start? Tell me what you’re into.
Your words go to Clef, a Cloudflare model that doesn’t write anything. It returns a probability for every option it was given, and those numbers set the weight of the type.
- Front-end craft
- Web3 & on-chain
- Servers & DevOps
- Making things
- WordPress
- Life, cricket & surf
- The link log
Start here
How this answer was made
What’s next
Typesense can do more than this site asks of it so far:
- Facets. Filter by year, category or link-versus-post, with live counts.
- Synonyms and ranking rules. Teach it that RWD means responsive web design.
- A better compass. The reading compass still gathers its keyword matches from SQLite. Feeding it hybrid results instead should give Clef better candidates to choose from.