News for hackers. Stuff that matters.
Re:Static web – back to the roots? by kragen on Saturday May 25, 2019 @03:17AM (#20007573)
I think this is a reasonable thing to do. For Dercuano, I hacked together a basic static site generator in Python 2 in a weekend (70% of the current static site generator code dates from the first three days, according to git blame); I've spent more time hacking on the CSS than on the Python, and immensely more time writing the text than either.

In case it's useful to someone else, as inspiration if nothing else, it's at https://gitlab.com/kragen/dercuano, in the public domain. The latest version of the output is at http://canonical.org/~kragen/dercuano-20190525.tar.gz.

Re:Static web – back to the roots? by jjjbokma on Saturday May 25, 2019 @01:18PM (#20010124)
Why Python 2 if I may ask?

I wrote my static site generator in Python 3.7 by manually translating the Perl version I had written earlier. Both are available at github https://github.com/john-bokma/tumblelog

Example of this set up: http://plurrrr.com/

Re:Static web – back to the roots? by kragen on Saturday May 25, 2019 @11:39PM (#20012939)
No real reason for using Python 2 — it was just an expedient choice in the moment.

Amusingly, your tumblelog.py is about the same size as dercuano.py, while the intersection of features is almost exactly empty. We managed to do even the most basic things differently — for example, yours reads a single long file with % lines separating the entries (like a fortune file!) and produces a passel of output files, while mine reads a passel of input files and produces a single multi-megabyte output file. This diversity of choices perhaps demonstrates the need for experimentation to see what works best for different people and in different circumstances. (Or it could just mean I'm insane.)