News for hackers. Stuff that matters.
Re:Show HN: Metalsmith – A pluggable static site generator by Touche on Friday March 07, 2014 @04:58PM (#7363019)
One problem I see. On the one hand you say:

> All of the logic in Metalsmith is handled by plugins.

But on the other hand, you say this:

> Each plugin is invoked with the contents of the source directory, with every file parsed for optional YAML front-matter, like so…

The YAML parsing should be a plugin as well, some of us have existing JSON front-matter files.

Re:Show HN: Metalsmith – A pluggable static site generator by icebraining on Friday March 07, 2014 @05:27PM (#7363157)
A JSON file is a YAML file, so what's the problem?
Re:Show HN: Metalsmith – A pluggable static site generator by asb on Friday March 07, 2014 @10:42PM (#7364139)
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
Re:Show HN: Metalsmith – A pluggable static site generator by ianstormtaylor on Saturday March 08, 2014 @04:36PM (#7366477)
That's really cool actually.
Re:Show HN: Metalsmith – A pluggable static site generator by ianstormtaylor on Friday March 07, 2014 @05:04PM (#7363056)
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...
Re:Show HN: Metalsmith – A pluggable static site generator by sturadnidge on Saturday March 08, 2014 @05:43AM (#7364840)
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...

Re:Show HN: Metalsmith – A pluggable static site generator by ianstormtaylor on Saturday March 08, 2014 @04:37PM (#7366484)
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.
Re:Show HN: Metalsmith – A pluggable static site generator by 8ig8 on Friday March 07, 2014 @06:01PM (#7363299)
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.)