Skip to content

Add YAML/TOML frontmatter processing (closes #633)#634

Open
skamradt wants to merge 1 commit into
Ionaru:masterfrom
skamradt:master
Open

Add YAML/TOML frontmatter processing (closes #633)#634
skamradt wants to merge 1 commit into
Ionaru:masterfrom
skamradt:master

Conversation

@skamradt

Copy link
Copy Markdown
  • Add enableFrontmatter option for frontmatter detection and rendering
  • Add previewIgnoreFrontmatter option to suppress table in preview
  • Render frontmatter as key-value table in preview (--- and +++ delimiters)
  • Apply cm-frontmatter CSS class with GFM heading/hr override in editor
  • Block all 21 formatting actions when cursor is inside frontmatter
  • Exclude frontmatter from word/line counts in status bar
  • Support multi-line values (|/>), comments (#), and indented keys
  • Add 14 E2E tests covering all frontmatter behaviors
  • Add docs/frontmatter.md reference documentation
  • Update CLAUDE.md with project docs and frontmatter pointers

- Add enableFrontmatter option for frontmatter detection and rendering
- Add previewIgnoreFrontmatter option to suppress table in preview
- Render frontmatter as key-value table in preview (--- and +++ delimiters)
- Apply cm-frontmatter CSS class with GFM heading/hr override in editor
- Block all 21 formatting actions when cursor is inside frontmatter
- Exclude frontmatter from word/line counts in status bar
- Support multi-line values (|/>), comments (#), and indented keys
- Add 14 E2E tests covering all frontmatter behaviors
- Add docs/frontmatter.md reference documentation
- Update CLAUDE.md with project docs and frontmatter pointers
- Remove inert renderLine handler (superseded by CSS override approach)

Co-Authored-By: Claude <noreply@anthropic.com>
@Ionaru

Ionaru commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Thank you for the PR!

I'll review the application code as soon as I can, but that will be after the weekend.
Something I already noticed was new CLAUDE.md and docs/frontmatter.md files, I don't think those should be added to the repo at this point.

For v3 (#447) I will add documentation and spec files for AI. But that will be in a generic way, e.g. AGENTS.md instead of CLAUDE.md.

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.

2 participants