Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Allow multiple frontmatter types #337

Closed
SG60 opened this issue May 15, 2022 · 5 comments
Closed

Enhancement: Allow multiple frontmatter types #337

SG60 opened this issue May 15, 2022 · 5 comments
Labels
enhancement New feature or request
Projects

Comments

@SG60
Copy link

SG60 commented May 15, 2022

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?

@estruyf
Copy link
Owner

estruyf commented May 16, 2022

Thank you @SG60 for the suggestion!

@estruyf estruyf added the enhancement New feature or request label May 16, 2022
@estruyf estruyf added this to To do in v7.3.0 via automation May 17, 2022
estruyf added a commit that referenced this issue May 17, 2022
@estruyf
Copy link
Owner

estruyf commented May 17, 2022

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.

@estruyf estruyf moved this from To do to In progress in v7.3.0 May 17, 2022
@SG60
Copy link
Author

SG60 commented May 17, 2022

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

@estruyf
Copy link
Owner

estruyf commented May 18, 2022

Thanks for testing it out @SG60.

@estruyf estruyf moved this from In progress to Done in v7.3.0 May 18, 2022
@estruyf
Copy link
Owner

estruyf commented May 25, 2022

It will be release in v7.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

2 participants