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

Tags and other metadata in YAML front matter format #149

Open
ghing opened this issue Jul 26, 2014 · 3 comments
Open

Tags and other metadata in YAML front matter format #149

ghing opened this issue Jul 26, 2014 · 3 comments

Comments

@ghing
Copy link
Contributor

ghing commented Jul 26, 2014

The recipes are in markdown. But they also have some metadata (e.g. tags). YAML front matter is a format used by Jekyll and other static site builders to add metadata to a Markdown file. It seems like a good fit for this project.

@knowtheory
Copy link
Collaborator

Hey @ghing, there've been a few discussions around structured metadata. By and large the POV that Tacofancy's taken is that things like YAML or JSON do set some barrier to entry for folks who don't know anything about structured metadata.

In the hopes of keeping things accessible to everyone, so far a flat list of tags is the sort of minimal structure that the project's adopted.

Personally I'm interested in what sorts of things people think they could do with hierarchically structured metadata that we think we can't get out of some flat lists of tags (If we think about JSON or whatever, we're already approximating a hash with a single key and an array of values using the format /tags:\s_\w+(,\s_\w+)*/ there's no reason we can't continue to add keys in a way that don't require a linter more complicated than a regexp).

@ghing
Copy link
Contributor Author

ghing commented Jul 28, 2014

@knowtheory, I don't have a need for more complicated, hierarchical taxonomies, it was just a thought that came to me as I was making my first recipe.

This issue comes more from looking over the docs, and being a little confused about where my tags should go to best work with someone's parser, and I thought that the YFM convention helped this a bit by forcing metadata to go at the top of the Markdown while also opening up the possibility for more complicated metadata without complicated the base use case.

@knowtheory
Copy link
Collaborator

Cool, that's super helpful to know!

For purely informational purposes the parser right now literally just breaking up the document by newlines, and then identifying the one that starts with "tags:" :) (so actually you could include it anywhere in the body of the doc on it's own line).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants