A tiny, dependency-light static blog. No framework — just Node, markdown-it,
and a few hundred lines of plain JavaScript and CSS. Visual style is minimalist
and cool-toned (slate / steel blue), inspired by the plainness of
https://www.1a-insec.net/.
- The directory is the table of contents. Drop a
.mdfile into any folder underblog/and it becomes a page; the sidebar and the/all/index are generated from the disk tree. - One config file. Everything you'd reasonably want to tweak —
site title, navigation, home page intro, sidebar pinning / rename rules —
lives in
site.config.mjs. - Zero client-side runtime. Pure static HTML + one CSS file. No JS shipped to the browser. No fonts loaded from a CDN. No tracking.
.
├── site.config.mjs # USER CONFIG — edit this for content / navigation
├── build.mjs # the static site generator (walks blog/ → dist/)
├── serve.mjs # tiny zero-dep preview server
├── templates/ # HTML templates
│ ├── layout.mjs # base shell (header / sidebar / footer)
│ ├── home.mjs # home page renderer
│ ├── page.mjs # article renderer
│ ├── filetree.mjs # /all/ page + sidebar renderer
│ └── util.mjs # HTML escaping, inline markdown
├── theme/
│ └── style.css # cool-toned theme (light + dark via media query)
├── blog/ # YOUR CONTENT
│ ├── about.md # becomes /about/
│ ├── ARM Cortex-M/ # any folder = a category
│ │ ├── ARM 汇编.md # any .md = a page
│ │ └── assets/ # `assets/` next to articles is copied verbatim
│ └── ...
└── dist/ # build output (gitignored)
npm install # install dev deps: markdown-it, anchor, attrs, chokidar
npm run build # build dist/
npm run serve # build, then serve dist/ at http://localhost:4000
npm run watch # rebuild on every changeOpen site.config.mjs. Everything is documented inline. Highlights:
site.title,site.description,site.lang,site.authorsite.nav— top-bar linkssite.socialLinks— footer linkshome.taglines— the rotating one-liner shown above the intro (first one is the current; the rest go into a "[Past taglines]" disclosure)home.intro— your free-form intro paragraphs (inline markdown OK)home.sections— bulleted lists shown below the introsidebar.ignore— basenames to exclude from the sidebar //all/indexsidebar.order— top-level categories pinned to the top of the sidebarsidebar.rename— display-name overrides (e.g. translate folder names)
Add a new category by creating a new folder under blog/. Add a new article
by dropping a .md file anywhere under blog/. No config changes are
required for new content.
Theme CSS and the SSG (build script, templates, server): MIT.
Your prose under blog/ is yours; the example content here is licensed
CC BY-SA 4.0.