Publishing a note

~3 min read

Publishing a note

Lettuce can render any note (or a folder of them, or your entire vault) to a static HTML site.

The opt-in: published: true

Add to frontmatter:

---
title: My public note
published: true
---

That’s the entire opt-in. Notes without published: true are excluded from the build.

Tip

published: false is the explicit opposite, useful if you want to surface “this is intentionally not published” to readers of your vault. Plain absence works just as well.

The CLI

lettuce publish

Builds the static site into <vault>/_site (override with --out). It prints a one-line summary:

Published 142 notes (18 images) to /Users/you/Notes/_site

The vault is positional: lettuce publish [vault] (defaults to the current directory). Other flags: --base-url, --contact, --all.

Inspect with:

lettuce serve-site _site

Starts a tiny web server (default http://127.0.0.1:8000, override with --port) serving the directory you pass — point it at the build output (_site). Useful for previewing before deploy.

In the app

The app has a Publishing action that runs the same build as the CLI, with progress shown in a dialog.

Per-note overrides

The frontmatter keys Lettuce reads when publishing:

Key Effect
published: false Excluded from build
description: (or summary:) <meta> description
tags: [...] Visible at the bottom of the page; linked to tag pages
date: / updated: (or modified:) Display dates
aliases: ["alt name"] Alternate names recorded for the note
author: Shown in the page’s meta row (author · date · updated)
title: Page title (defaults to the filename)

What’s stripped

The renderer strips a few things from the published HTML:

(^block-id markers are not specially processed — they’re used for wikilink targeting ([[note#^id]]) and patch_section, but the renderer leaves the marker text as-is rather than stripping or anchoring it.)

What’s preserved

URL structure

Every published note becomes one flat .html file — the relative path with / replaced by _:

Source path Output file
index.md index.html
Projects/Lettuce.md projects_lettuce.html
Reading/2026/05/note.md reading_2026_05_note.html

(So there are no nested directories in the output — the whole site is flat files plus an assets/ folder.)

Keeping work-in-progress out

Only notes with published: true are built. To keep a draft out of the public site, simply leave published off (or set it to false). Everything else in the vault is ignored by the build.

What doesn’t get published

HTML documents (Claude artifacts)

HTML documents can’t carry frontmatter, so their opt-in is HTML-native: <meta name="lettuce-published" content="true"> in the head (right-click → Publish to Site adds it for you). Published artifacts are copied to the site byte-for-byte — no theme, no wrapping, inline scripts intact — and listed on the index by their <title>. Their content stays out of the site’s search, matching the in-app reader’s opaque treatment. See Recipes/13 Save Claude’s work into your vault for having Claude mark artifacts public at generation time.