lettuce publish

~2 min read

lettuce publish

Build the static site from your vault.

lettuce publish [vault] [options]

The vault is a positional argument (the first non-dash arg). If omitted, the current directory is used.

Options

Flag Default Notes
--out PATH <vault>/_site Output directory
--base-url URL (none) Base URL for absolute links
--contact EMAIL (none) Contact address embedded in the site
--all off Publish all notes, not just published: true

By default only notes with published: true are built. Pass --all to build every note.

Examples

Build with defaults:

lettuce publish
Published 142 notes (18 images) to /path/to/vault/_site

Build a specific vault to a custom directory:

lettuce publish ~/Notes --out reading-site/

Publish everything (including notes without published: true):

lettuce publish --all

Set a base URL and contact address:

lettuce publish --base-url https://notes.example.com --contact me@example.com

Performance

Vault size Full build
100 notes ~0.4s
1000 notes ~3s
5000 notes ~18s
10000 notes ~38s

On M1 Pro. Mostly CPU-bound on rendering; the link/tag indices build in parallel.

What runs

  1. Scan the vault, find all notes with published: true (or every note with --all)

  2. Build link/tag indices

  3. Render each note → HTML

  4. Build tag pages, sitemap, RSS, search index

  5. Copy assets and attachments

  6. Write to --out