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

Plugable metadata parsers #11

Open
brianloveswords opened this issue Oct 28, 2013 · 2 comments
Open

Plugable metadata parsers #11

brianloveswords opened this issue Oct 28, 2013 · 2 comments

Comments

@brianloveswords
Copy link
Collaborator

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:

  1. We could put something into config.json, like metadata: ('htmlcomment' | 'default')' or something like that.
  2. A new command on the balrog binary, balrog use meta-htmlcomment. This would also install the package if necessary.

I should also pull out/modularize the default parser.

@jlord
Copy link
Owner

jlord commented Oct 30, 2013

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?

@brianloveswords
Copy link
Collaborator Author

Yep! We can get rid of those. After thinking about it, I also believe number one is the best path.

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