rapid1337.com

A 100-Line Static Site Generator

2026-06-28 · [ code ] · by staff · JavaScript · source »

The whole build is Markdown in, HTML out — no framework required.

<-- newest | [ Code ]

[ read in diskmag ]


The generator behind this site is plain Node. It scans a content folder, parses frontmatter, renders Markdown, and writes HTML. That's it.

import fs from "node:fs";
import matter from "gray-matter";
import { marked } from "marked";

export function renderEntry(file) {
  const { data, content } = matter(fs.readFileSync(file, "utf8"));
  return { ...data, html: marked.parse(content) };
}

No bundler, no hydration, no client framework. The only JavaScript that ships to the browser is the stuff that actually needs a browser: the music engine, the background cube, and the effects demos.

#javascript #tooling


<-- newest | [ Code ] | Plasma -->