-
Notifications
You must be signed in to change notification settings - Fork 26
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
change markdown header format to be more flexible #155
Comments
I believe YAML would take a bit longer to parse, but it seems like a good choice IMHO. |
Hey @soapdog, you are talking about marked-metadata module, right? About YAML, i think we can support it, but not just YAML. As @UltCombo said, you're very welcome to be part of the org @soapdog :) |
Actually, i don't know ahahah |
I think it supports JSON. |
Hey Friends,
Been working here trying to convert my docpad site to harmonic and stumbled upon some issues one of which is that I am using the document/post/page header to convey more data to the template than what we can currently do in harmonic.
One example is a post where I want to list links that are related to the article at hand. On my current site source, I have an array of objects in the header in a field called links, each array element has a title and a url. This is assembled by the template in the sidebar.
This could be done in harmonic if we simply passed all the data from the header to
post.metadata
and switched the current header format. Right now, we're relying on marked-header node module which uses a DIY to parse the human friendly header format into an object. Unfortunately that module can only handle simple key/value pairs and trying to pass a more complex data is not possible.My enhancement advise would be to change the implementation of marked-header module to use a friendly syntax in the header that is more powerful than the current one. I would advise using some YAML module because all the current headers would still work and we would have features to pass more complex stuff.
Without the ability to pass more complex data along with the document it becomes trickier to drive plugins and create more flexible templates.
The text was updated successfully, but these errors were encountered: