Hacker News new | past | comments | ask | show | jobs | submit login

Static site generators seem like music databases, in that everyone eventually writes their own crappy one that just barely scratches the itch they had (and I'm no exception).



Now that you mention it, building a static site generator would make a great learning exercise for a new programmer. Since they are a fairly common personal project, there are a lot of examples from which to examine.


Indeed! While I learned a lot from Rails' because of how it prescribes a certain structure and approach, the size of it all and the 'magic' that hid a lot of (important) detail was probably suboptimal.

Now I'd been building websites for a while, so I'd already gone organically through the whole 'hey let's use php to cut my pages up into reusable modules', 'I can automate this thing here', 'plugins are awesome!', and 'hey what's this MVC thing'.

But for people starting from less, a static site generator might be more explicit and less complex to learn with.

The mere fact that there's often a 'build' step that converts your stuff to plain html, javascript and css, I find, makes beginners feel like they understand things a little better.


I wrote one when i was at school, probably 1997 or 1998, to help a friend build a fan site for the Longpigs [1]. I assumed it was long lost, but apparently he took it to university with him, and the web archive caught it:

http://web.archive.org/web/20010519223318/http://users.ox.ac...

I think all the content was in handwritten HTML, but the generator knew enough to be able to do the navigation links and sitemap and so on.

[1] http://en.wikipedia.org/wiki/Longpigs


I made one last weekend with nodejs and express, at least it's a good exercise for stretching your muscles in a new programming language.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: