TIL: Obsidian vault folders can trigger blog sync without frontmatter flags
Instead of adding publish: true to every note, the sync script can treat specific folders as auto-publish zones.
How it works
const inBlogFolder = resolve(vaultFile).startsWith(VAULT_BLOG_DIR + '/');
const inTilFolder = resolve(vaultFile).startsWith(VAULT_TIL_DIR + '/');
const shouldPublish = fm.publish === true || ((inBlogFolder || inTilFolder) && fm.publish !== false);
- Notes in
til/→ auto-synced to blogtilcollection, no frontmatter needed - Notes in
Blog/→ auto-synced to blogpostscollection publish: falsestill opts a note out explicitly- Collection is inferred from source folder when
typeis not set in frontmatter