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

feat: support json/toml front matter #141

Closed
4 tasks
slathrop opened this issue Apr 18, 2018 · 4 comments
Closed
4 tasks

feat: support json/toml front matter #141

slathrop opened this issue Apr 18, 2018 · 4 comments
Labels
contribution welcome Contributions welcome

Comments

@slathrop
Copy link
Contributor

slathrop commented Apr 18, 2018

Similar to other SSGs (Hugo, etc.), add support in VuePress for TOML and JSON front matter (in addition to YAML).

  • Select or write package equivalent to yaml-front-matter
    • Consider switching from yaml-front-matter to gray-matter
  • Add reference to /lib/prepare.js
  • Complete Implementation
  • Complete Testing
@yyx990803
Copy link
Member

Would be open to a PR that switch to gray-matter.

@yyx990803 yyx990803 changed the title feat: support toml front matter feat: support json/toml front matter Apr 18, 2018
@yyx990803 yyx990803 added the contribution welcome Contributions welcome label Apr 18, 2018
@colinbate
Copy link

The current integration of gray-matter is a good start, but it doesn't support the more common TOML frontmatter delimiters of +++. Unfortunately, gray-matter doesn't implement this auto-detection, but preliminaries does. I'm not suggesting another switch, as it should be something that VuePress can implement itself. At least until it gets added upstream.

If I get a chance in the next couple of days, I should be able to make a PR.

@colinbate
Copy link

colinbate commented May 2, 2018

In case anyone is interested, I decided to try and get the custom delimiter functionality implemented upstream in gray-matter directly. Hopefully, it will be sorted out before long.

jonschlinkert/gray-matter#75

@ulivz
Copy link
Member

ulivz commented May 10, 2018

Fixed by #164

@ulivz ulivz closed this as completed May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Contributions welcome
Projects
None yet
Development

No branches or pull requests

4 participants