Hmm yeah that's true. Tough call since that is the front-matter is a 99% case, and the idea of file's being able to have their own metadata is kinda core to the functionality. I wonder if I could just add support for both JSON/YAML by default. Would get annoying if people started asking for more front-matter types thought...
It's cerainly as sane as sane defaults come, but I agree that if the philosophy is 'everything-as-a-plugin' (another excellent choice for this kind of tool) then everything should be a plugin :)
Now to build something with this, I can see a 'dual write' plugin in my immediate future...
Thought about it a bit more (was actually convinced for a second) but then I realized that that would mean lots of the other plugins would be depending on the YAML/JSON plugins as well. And when you have dependencies between plugins like that things start to get too complicated for the benefits I think.
Comments
One problem I see. On the one hand you say:
But on the other hand, you say this:
The YAML parsing should be a plugin as well, some of us have existing JSON front-matter files.
A JSON file is a YAML file, so what's the problem?
I'm not sure why this is getting downvoted (well, maybe the tone), it's true that YAML is a superset of JSON http://en.wikipedia.org/wiki/YAML#JSON
That's really cool actually.
Hmm yeah that's true. Tough call since that is the front-matter is a 99% case, and the idea of file's being able to have their own metadata is kinda core to the functionality. I wonder if I could just add support for both JSON/YAML by default. Would get annoying if people started asking for more front-matter types thought...
It's cerainly as sane as sane defaults come, but I agree that if the philosophy is 'everything-as-a-plugin' (another excellent choice for this kind of tool) then everything should be a plugin :)
Now to build something with this, I can see a 'dual write' plugin in my immediate future...
Thought about it a bit more (was actually convinced for a second) but then I realized that that would mean lots of the other plugins would be depending on the YAML/JSON plugins as well. And when you have dependencies between plugins like that things start to get too complicated for the benefits I think.
You could have 'reading' and 'rendering' plugins. Reading plugins obtain the content and meta-data.
A possible use case would be generating pages from an RSS feed. You'd have to specify the meta-data separately in some config though.
(Sorry, really don't want to over-design something that seems simple and elegant. Just a thought.)