dansinker / tacofancy

community-driven taco repo. stars stars stars.
The Unlicense
1.29k stars 448 forks source link

Tags and other metadata in YAML front matter format #149

Open ghing opened 9 years ago

ghing commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

@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 commented 9 years ago

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).