Hacker News new | ask | show | jobs
by alxlaz 3131 days ago
A very long time ago, there used to be these programs that helped you write, maintain and manage static HTML websites (this was back when CGI was more or less a recent invention, and the only way to have access to it was to run your own server, which was not an option for everyone). It was basically a WYSIWYG HTML editor a la FrontPage (oh, the horror!) + an FTP client + some basic version control and project management all in one solution.

Unix geeks being Unix geeks would bake their own concoctions, with Emacs, Perl and whatnot. I had one lying around for years, dragged kicking and screaming out of the foggy Interwebs of 1998.

This sort of tools were needed because back then, a static website with hundreds, maybe thousands of pages was not at all unheard of. My first paying gig was for a computer magazine which had, in 2002, just upgraded its website to a fancy dynamic thing (it was a CMS, but the system it ran predated the term, I believe). Prior to that, they had a static website, containing a lot of the articles that had been published, mailing list archives (statically generated -- the mail server that was running it was sitting in the corner of an office and it had a cron job doing the archiving) and a bunch of other things. It definitely had thousands of pages, and a lot of them were hand-written.

If you are willing to forgo a couple of things, like managing relative paths, it is remarkably easy to get somewhat primitive (but sufficient) templating support and management out of nothing but your favourite shell which also produces remarkably clean output. At the end of the day, generating a static HTML page largely consists of concatenating a header, body and footer section, then replacing a number of variables.

The script I use today barely has 150 lines, about a third of which are comments. The only thing I need which it does not do is automatically generate RSS entries, which I think would take maybe another 50 lines or so, but I am just too lazy.

For a while, I also used a GUI script I wrote in an afternoon or so, which would help me with things like creating new pages automatically (i.e. writing the initial boilerplate in the right directory), but I found myself using it very rarely or not at all. I thought I would write an emacs mode for it, but it also turned out I just do not really need one.

If you run a blog with a high posting rate, you definitely need a real thing, but if you post maybe one or two things a week... meh. I have been using this contraption for almost two years now, and while some things require manual intervention, I think I have definitely spent less time working around its shortcoming than fiddling with WordPress and managing the whole LAMP (well OpenBSD-Nginx-MP) thing behind it and whatnot.

There are also things like Pelikan, which I am quite certain HN knows about, which are even more flexible than anything one writes by themselves.