Skip to content
levybuildz

How This Site Publishes

Notes live in an Obsidian vault. One flag in a note puts it here; removing the flag takes it down.

2 min read
  • markdown
  • workflow

Posts start life as ordinary notes in my Obsidian vault. Nothing in the vault is public unless a note explicitly opts in.

Opting a note in

Add this frontmatter to the note:

FieldRequiredNotes
publishyesMust be true. Anything else and the note stays private
titleyesAlso becomes the URL slug, unless slug is set
descriptionyesUsed for SEO and link previews
datenoYYYY-MM-DD. Defaults to the day it is first published, and stays put after that
tagsnoA list, or one comma-separated string
slugnoOverrides the slug derived from the title
draftnotrue keeps the post out of production builds

Some folders — personal, health, finance, inbox — can never be published, even if a note in them says publish: true. A stray flag should not be enough to put a private note on the internet.

Shipping it

pnpm posts:preview   # what would change, touching nothing
pnpm posts:publish   # sync, commit, push

The sync copies opted-in notes into content/posts/, turns [[wikilinks]] into plain text, and deletes posts whose note was unpublished or retitled. The push triggers a Cloudflare build. If the build fails, the previous version keeps serving.