Open soapdog opened 9 years ago
I believe YAML would take a bit longer to parse, but it seems like a good choice IMHO. Feel free to experiment and send a PR. :)
@soapdog By the way, since you've already contributed substantially to the project and we are adopting the "open open source" governance model (or something like, @jaydson and I are still ironing the details), we can provide you with commit access to the repo if you'd like.
Hey @soapdog, you are talking about marked-metadata module, right?
I think i didn't understand the problem you pointed.
I've built the marked-metadata
module because i wanted exactly what you said, more flexibility in the posts data than marked
module have.
About YAML, i think we can support it, but not just YAML. There's no reason to throw away JSON format support. (Just ignore what i said if it is not the proposal)
As @UltCombo said, you're very welcome to be part of the org @soapdog :)
@jaydson does marked-metadata support arrays/objects as values of a key? That's what @soapdog is proposing as far as I can see.
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.