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: Add JSON support #230

Closed
kilasuit opened this issue Jan 16, 2022 · 1 comment
Closed

Enhancement: Add JSON support #230

kilasuit opened this issue Jan 16, 2022 · 1 comment
Labels
enhancement New feature or request
Projects
Milestone

Comments

@kilasuit
Copy link

Is your feature request related to a problem? Please describe.
Whilst TOML and YAML are supported it should also be able to use json as this is supported as an option in Hugo sites.

Describe the solution you'd like
Add JSON Support

Describe alternatives you've considered
I could use YAML/TOML but it is often much easier programattically amend JSON based FrontMatter outside of this extension.

Additional context
Add any other context or screenshots about the feature request here.

estruyf added a commit that referenced this issue Jan 16, 2022
@estruyf
Copy link
Owner

estruyf commented Jan 16, 2022

Thanks @kilasuit for the suggestion. As most use TOML or YAML, support for JSON was a low priority.

In the lastest beta, you'll be able to set the frontMatter.taxonomy.frontMatterType setting to JSON. Once you've done this, it knows to always parse your front matter as JSON.

Sample used for testing:

---
{
  "title": "Page title",
  "lastmod": "2022-01-16T18:46:47.691Z"
}
---

This is some test content.

@estruyf estruyf added this to the 6.0.0 milestone Jan 16, 2022
@estruyf estruyf added this to Ready to test in v6.0.0 Jan 16, 2022
@estruyf estruyf added the enhancement New feature or request label Jan 16, 2022
@estruyf estruyf moved this from Ready to test to Done in v6.0.0 Jan 19, 2022
@estruyf estruyf closed this as completed Jan 25, 2022
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