Show HN: Gugodoc, my static web generator (for what it's worth )
gugodoc.free.fr
gugodoc.free.fr
I'm currently extending the tests for the generator, and will release it then. If anyone is interested, drop me a note and I'll notify :)
<title>...</title> (pretend this isn't already taken) <author>...</author> <date>...</date> <summary>...</summary> ...
It seems like XSLT is what I want, except that I have to deal with a bunch of XML nonsense. I could always write my own parser, but I keep hoping someone already wrote something like this.
Not the parser, just the transformation phases. Maybe something like the Haskell XML toolbox or Clojure data manipulations (XML -> clojure data structure -> munge[0] -> XML) would work for you.
[0] basic options: Enlive, or parse XML to Hiccup and manipulate Hiccup tree before serialising back.
You can read about jinja2 template inheritance in their docs [1]. The gist of it is that you can define a layout in HTML, with placeholders for specific things like the title, author, content, etc. Then your actual post is just a file that inherits from that layout template and only defines the relevant blocks. So in "template pseudocode" your page might look like this:
{{ extends site_layout }}
{{ block title }} Title here {{ endblock }}
{{ block author }} delluminatus {{ endblock }}
{{ block content }}
<p>Content!</p>
{{ endblock }}
[1]: http://jinja.pocoo.org/docs/templates/#template-inheritance I'm a big fan of minimalism.
I love markdown
I hate HTML
If you hate HTML, are you sure you should write something that outputs exactly that?He probably mean to write HTML.
Also, I have saved a lot of time looking around for existing solutions than just doing it myself. :)