Skip to content

feat(patterns): add generate_frontmatter for PKM/Obsidian users#2122

Open
OdinKral wants to merge 1 commit into
danielmiessler:mainfrom
OdinKral:feat/generate-frontmatter-pattern
Open

feat(patterns): add generate_frontmatter for PKM/Obsidian users#2122
OdinKral wants to merge 1 commit into
danielmiessler:mainfrom
OdinKral:feat/generate-frontmatter-pattern

Conversation

@OdinKral
Copy link
Copy Markdown

Summary

Adds generate_frontmatter — a pattern that produces clean, paste-ready YAML frontmatter from any text input.

Designed for PKM workflows (Obsidian, Logseq, or any markdown notes vault), but useful for anyone who wants structured metadata quickly.

Output fields

Field Description
title Exact or inferred title
aliases 1–3 alternative names to search by
tags 3–8 specific lowercase tags, supporting hierarchy (philosophy/stoicism)
type Document type: article, chapter, transcript, meeting-notes, essay, reference, idea, book
author Extracted or omitted
source URL or citation if available
date Document date or omitted
summary One sentence (15–25 words) capturing the core content
status Starts as unprocessed

Usage

cat article.md     | fabric -p generate_frontmatter
pbpaste            | fabric -p generate_frontmatter
yt URL --transcript | fabric -p generate_frontmatter

Output is only the YAML block — paste directly at the top of a note.

Design notes

  • Tags use lowercase + hyphens; hierarchical tags use slash notation
  • Fields that can't be inferred are omitted rather than guessed
  • Summary is always a complete sentence, not a fragment
  • Status defaults to unprocessed as the entry point for a processing workflow

Closes #1235.

🤖 Generated with Claude Code

Adds a pattern that generates clean, paste-ready YAML frontmatter for
any text input. Designed for PKM systems such as Obsidian and Logseq
but works for any markdown-based note vault.

Given a document, article, transcript, or rough draft it produces:
  title, aliases, tags (specific + hierarchical), type, author,
  source, date, summary, and status fields.

Usage:
  cat article.md | fabric -p generate_frontmatter
  pbpaste       | fabric -p generate_frontmatter
  yt URL        | fabric -p generate_frontmatter

Addresses feature request danielmiessler#1235.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request]: YAML FrontMatter pattern

1 participant