Open brianloveswords opened 11 years ago
Cool! I like number one, but also defer to your judgement!
We should get rid of the old index.js and meta.js in the root, right?
Yep! We can get rid of those. After thinking about it, I also believe number one is the best path.
So the original metadata parser works by convention: it expects the headers to represent title, author, date and tags in that specific order. This is super lightweight (implementation is only ~10 lines!) and awesome if your posts always conform to that.
However, for some of my stuff I wanted some finer control over what kinda metadata I can put into the doc. To that end, I wrote balrog-meta-htmlcomment to be able to declare metadata upfront in an HTML comment. This still allows the markdown files to be displayed directly (which would have been the issue with YAML frontmatter) but gives some better control.
We need to figure out a good way to declare which style of metadata parser to use. I'm thinking a couple of things:
config.json
, likemetadata: ('htmlcomment' | 'default')'
or something like that.balrog use meta-htmlcomment
. This would also install the package if necessary.I should also pull out/modularize the default parser.