3 ms·
I've certainly written lots of HTML in HTML, but for Dercuano https://gitlab.com/kragen/dercuano https://gitlab.com/kragen/dercuano I wrote a static site genera
by kragen 7y ago
I've certainly written lots of HTML in HTML, but for Dercuano https://gitlab.com/kragen/dercuano https://gitlab.com/kragen/dercuano I wrote a static site generator over the weekend in Python. (The Gitlab link is the source; the latest release of Dercuano, built, is at http://canonical.org/~kragen/dercuano-20190610.tar.gz http://canonical.org/~kragen/dercuano-20190610.tar.gz .)
Adding a new note to Dercuano just involves writing a new Markdown file in the markdown directory, so as with HTML, there's no threshold. Actually, there's less of a threshold: with HTML nowadays, I have to add stylesheet links, and meta tags so browsers don't interpret it as ISO-8859-1, and more meta tags so phones display the text at a readable size, and a <script> tag to add the table of contents... with Dercuano, I just start writing text. By default, the title is generated from the filename, or from the <h1> if the Markdown starts with one.
Why not just copy and paste? Well, aside from reducing the download size, sometimes I want to improve something for all the pages at once. Fonts, for example. There's always the risk that that will break some existing page, but I think the grain size where that's the dominant part of the tradeoff is somewhat larger than the million-word size of Dercuano.
I mention this not because I want you to use the Dercuano software (although you're welcome to and it's in the public domain so you're legally protected) but because I want you to know that writing your own is an easy weekend project.