Enhancement: Allow multiple frontmatter types #268

Closed
opened 2026-10-05 02:36:53 +02:00 by adam · 5 comments
Owner

Is your feature request related to a problem? Please describe.
My Hugo website currently uses TOML frontmatter for new content; however, I also have a large amount of YAML. Hugo copes with this fine, so it would be great for Frontmatter to support that as well if possible!

Describe the solution you'd like
To allow multiple frontmatter types, perhaps distinguished by the characters used as guards. E.g. --- seems standard for YAML, while +++ is standard for TOML. Could the frontmatterType option be changed to an array of accepted frontmatter types?

**Is your feature request related to a problem? Please describe.** My Hugo website currently uses TOML frontmatter for new content; however, I also have a large amount of YAML. Hugo copes with this fine, so it would be great for Frontmatter to support that as well if possible! **Describe the solution you'd like** To allow multiple frontmatter types, perhaps distinguished by the characters used as guards. E.g. `---` seems standard for YAML, while `+++` is standard for TOML. Could the frontmatterType option be changed to an array of accepted frontmatter types? <!-- github-sync-id:1236364091 -->
adam closed this issue 2026-10-05 02:36:53 +02:00
Author
Owner

Thank you @SG60 for the suggestion!

Thank you @SG60 for the suggestion! <!-- github-comment-id:1127495662 -->
Author
Owner

Changed the logic of Front Matter to automatically detect this per file, no need for setting changes.

The original setting is still used for the creation of new files.

PS: This is testable in the latest BETA version.

Changed the logic of Front Matter to automatically detect this per file, no need for setting changes. The original setting is still used for the creation of new files. PS: This is testable in the latest BETA version. <!-- github-comment-id:1128933817 -->
Author
Owner

Just tried it, all seems to be working!! Thanks!

Just tried it, all seems to be working!! Thanks! <!-- github-comment-id:1129213730 -->
Author
Owner

Thanks for testing it out @SG60.

Thanks for testing it out @SG60. <!-- github-comment-id:1129655705 -->
Author
Owner

It will be release in v7.3.0

It will be release in v7.3.0 <!-- github-comment-id:1137099821 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#268