4 ms·
Is there any advantage (to the end-user) of using a 'Clojure map' for the front matter of a post, rather than using YAML like site generators from other languag
by nilliams 12y ago
Is there any advantage (to the end-user) of using a 'Clojure map' for the front matter of a post, rather than using YAML like site generators from other languages do, e.g. Jekyll, Wintersmith (Node), Mynt (Python).
I kinda like that my markdown files are cross-compatible with any of these various site generators and would say that YAML front matter is something of a de-facto standard?
If avoiding YAML is an opinionated stance aimed at fellow Lispers, then I think that's fair, but I think the messaging should perhaps be more along the lines of 'this is a site generator for Clojure people', not 'this is the easy site generator'.
I don't think that's a bad thing, as a lot of people prefer to use a site generator written in their language of choice.
Of course this could be made a moot point by offering a YAML plugin and a single line in the docs saying '... or you can use YAML syntax if you'd prefer'.
Also w.r.t using Clojure maps, the metadata section of the writing posts [1] docs page could use a full example, otherwise I need to google Clojure map syntax.
[1] http://cryogenweb.org/docs/writing-posts.html http://cryogenweb.org/docs/writing-posts.html
- lacarmen 12y agoAvoiding YAML is opinionated :) I'm using the Clojure reader to parse Markdown files. It reads the next form from an input stream and returns the object represented by that form so by using a Clojure map to represent the metadata, there is no need to do additional parsing. The rest of the Markdown file is read line by line. And I'll make a note to add a full example of the metadata in the docs.