-
Notifications
You must be signed in to change notification settings - Fork 603
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
TOML frontmatter extraction should look between +++ instead of --- #3094
Comments
Is this convention common across tools? Or specific to Hugo? |
It's definitely not in the spec (ref: toml-lang/toml#511). I think that this is application-specific, but I honestly don't see a lot of tools that use toml front matter in general. I would be okay with changing it just because of Hugo because Hugo is the only tool I know of that even offers it as an option. Alternatively, maybe this is an option we can provide instead (though that looks to be difficult given there is a lot of regex involved)? As an aside: for a language that claims to be designed around simplicity, parsing it sure seems to be a nightmare. |
I guess the better question is: are there tools that DON'T user Why don't we parse |
I researched a bit about toml front matter support across tools:
|
Good to know I'm not completely off base 😄. Cool to see a more complete analysis of tools. |
Describe the bug
Steps to Reproduce
extract TOML frontmatter from a hugo/zola blog post:
using https://deno.land/std@0.171.0/encoding/front_matter/toml.ts doen't extract the frontmatter at all as it looks between
---
instead of+++
Expected behavior
Extract the TOML frontmatter contained within
+++
Environment
see https://github.com/denoland/deno_std/blob/main/encoding/front_matter/mod.ts#L176 where separator for TOML is
---
instead of+++
(as described in https://gohugo.io/content-management/front-matter/#front-matter-formats)The text was updated successfully, but these errors were encountered: