Answer
The blog is a 431-line Node script plus a 179-line layout module. Neither has a dependency: 182 posts and 431 diagrams become 648 files in 277 ms. Cloudflare Pages serves those files with nothing running at the edge.
- A post is frontmatter plus HTML, so no Markdown engine ships.1
- Diagram art is compiled once into a gzipped bundle, then expanded by the build.2
- Stylesheets, icons and the Open Graph image are content-hashed, so the edge caches them for a year.3
- Deploy is a push: Pages runs
npm run buildand publishesdist, so no upload step exists.
Applies tonurazhar.combranch mainone build, 277 ms
What goes into the build?
Five inputs feed build.mjs, and each has one job. Nothing else is read at build time.
| Input | Job | Amount |
|---|---|---|
src/content/blog/*.md | Frontmatter plus HTML body, one file per post | 182 files |
src/pages/*.html | Body of index, hire, agentic-ai-security and 404 | 4 files |
src/styles/global.css | The only stylesheet | 62,989 bytes |
src/archify/ | Page shell and gzipped diagram bundle | 709,245 bytes |
public/ | Assets, _headers, _redirects, llms.txt | copied as-is |
Diagram structure
- nurazhar-com
root - build.mjs
bm - src
src - content/blog
blog - pages
pages - archify
arch - public
pub root→bmroot→srcsrc→blogsrc→pagessrc→archroot→pub
The post format is the unusual part. A file opens with a --- block of keys, then the body is HTML such as <figure>, <h2> or <table>. Two hand-written functions read those keys and keep the body verbatim, so the build never needs a parser dependency.1
function parsePost(filePath) {
const raw = fs.readFileSync(filePath, 'utf8');
const match = raw.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);
if (!match) throw new Error(`Missing frontmatter in ${filePath}`);
const data = {};
for (const line of match[1].split(/\r?\n/)) {
if (!line.trim()) continue;
const idx = line.indexOf(':');
if (idx === -1) continue;
const key = line.slice(0, idx).trim();
data[key] = parseScalar(line.slice(idx + 1));
}
const id = path.basename(filePath, '.md');
return {
id,
title: String(data.title ?? id),
description: String(data.description ?? ''),Which stage does what?
The build is ten steps in a fixed order. Two of them decide everything downstream: dist is emptied first, and the post list is sorted before any page renders.
Diagram structure
- Empty dist
wipe - Copy public
pub - Expand 431 diagrams
arch - Hash CSS and OG
hash - Sort posts by order
sort - Render 5 pages
pages - Render 182 posts
posts - Feed and search index
feeds - Sitemaps and llms
maps arch→hashfeeds→mapshash→sortpages→postsposts→feedspub→archsort→pageswipe→pub
The sort key is order descending, then pubDate, then id. One array of posts then feeds five outputs: the blog index, feed.xml, search-index.json, both sitemaps and llms-full.txt.1
How does one post become one page?
parsePost returns an object; renderLayout wraps it in the document. The layout sets the canonical URL from the slug, emits Open Graph and Twitter tags, and inlines a theme script before first paint so the page never flashes the wrong colour.4
The body is inserted without escaping, which is why posts are authored as HTML. A title and a description are escaped, because they come from frontmatter.
Nothing else is per-post. There is no pagination, no tag route and no related-posts query: _redirects sends /blog/* and /tag-* to /blog.
How do 431 diagrams reach 141 posts?
A manifest is a JSON list of components, connections and cards. The compiler renders each entry through the Archify CLI, writes one file per diagram, and appends a record to a gzipped bundle.
Diagram structure
- manifests.json
mf - compile-archify.py
cc - shell and ndjson
bd - build.mjs
bm - iframe in post
if mf→cc· 427 plus 4cc→bd· 431 recordsbd→bm· expandbm→if· dist/archify
The bundle holds the 29,264-byte page shell once, and 679,981 gzipped bytes for all 431 diagrams. At build time five string replacements fill the shell: title, heading, explanations, SVG and cards. That is the whole renderer.
Each post embeds the result as an iframe. A resize observer in the layout gives every frame the height of its own document, so a figure never hides behind an inner scrollbar.4
What lands in dist?
Everything is static. There is no function, no middleware and no server process.
| Kind | Files | Produced from |
|---|---|---|
| HTML | 619 | 182 posts, 5 pages, 431 diagrams, 1 standalone explainer |
| CSS | 2 | global.css hashed, plus the shared diagram viewer |
| JavaScript | 4 | search.js, webmcp.js, viewer and theme |
| XML | 3 | feed.xml, sitemap-0.xml, sitemap-index.xml |
| Text | 4 | llms.txt, llms-full.txt, robots.txt, humans.txt |
648 files in total, and dist is deleted before every build, so a removed post cannot leave a page behind.
How does it reach the edge, and how is that proven?
The Pages project builds on push to main and publishes dist. _headers adds the security headers, and marks fonts, styles.*.css and og.*.png as immutable for a year. The root also carries a Link header that points at llms.txt. _redirects holds 23 rules for legacy paths.3
Is a Common Lisp rewrite warranted?
No. The pipeline is 610 lines with no dependencies, builds in 277 ms and runs nothing at the edge. A rewrite must delete code, not translate it.
- Pipeline code
- 610 lines of JavaScript
- Dependencies
- none in
package.json - Build
- 277 ms for 648 files
- Edge runtime
- none
One measured defect exists, and it does not need a new language. llms.txt is static and claims 181 posts while the build holds 182; llms-full.txt is generated and already prints the true count. Three emitted lines would end the drift, which is less code than today.1