Site architecture
How the site is generated, where files live, and how to extend it.
The site is a static build produced by Eleventy.
Markdown files in section directories are rendered with Nunjucks layouts
and written to _site/. There is no client-side framework and no
runtime database.
Directory layout
src/
_data/site.js site-wide metadata + section list
_includes/
layouts/ base, page, entry, section
partials/ header, footer, mark (svg)
assets/css/main.css the entire stylesheet
notes/ section: notes/*.md + index.njk
writings/ section: writings/*.md + index.njk
documents/ section: documents/*.md + index.njk
projects/ section: projects/*.md + index.njk
arachne/ section: arachne/*.md + index.njk
index.njk home page
.eleventy.js Eleventy config (collections, filters)
package.json build/serve scripts
Build
npm install
npm run build # writes _site/
npm run serve # local dev server with watch
Adding a new entry
- Pick the section.
- Create
YYYY-MM-DD-slug.mdin that directory. - Frontmatter:
title,date, optionalsummary. - Save. The build picks it up; it will appear in the section index and, if recent enough, on the home page.
Adding a new section
- Create the directory under
src/. - Add a section data file (e.g.
things.json) defining the layout, permalink, section name, and tag. - Add an
index.njkusing thelayouts/section.njklayout. - Register the section in
src/_data/site.jssectionsarray and add a collection in.eleventy.js.