11ty

Eleventy (11ty) is a simple static site generator in JavaScript. I used it for an earlier version of this site before moving to a custom generator - see static sites.

package.json

This file holds metadata for the project.

The "scripts"-section sets npm commands. E.g.:

  "scripts": {
    "start": "eleventy --serve",
    "compile": "eleventy"}

lets you use npm start to serve eleventy or npm run compile to build the static site content from templates.

Debugging

To see what eleventy is doing run it with debug output: DEBUG=Eleventy* npx @11ty/eleventy (on Windows cmd: set DEBUG=Eleventy* & npx @11ty/eleventy). See more at https://www.11ty.dev/docs/debugging/.

Eleventy uses .eleventyignore and .gitignore from the generator's root (same folder as .eleventy.js).

Filtering content

Filtering with 11ty ignore seems difficult to do based on content. My idea back then was a small preprocessing step that copies notes to a content folder but excludes some. When I built my own generator this ended up as a published.txt file listing the notes that go on the site.



Connected Notes

⚡

Knowledge Graph

Controls

Hub Nodes
Categories
Notes