New To Me: Static Site Generators and A JavaScript Blog

Adventures in JavaScript Development

I’m working on improving my meager JavaScript skills. One useful resource I’ve found is Adventures in JavaScript Development (rmurphey.com. ). It’s the lively technical and personal blog of JavaScript guru Rebecca Murphey, who writes eloquently on everything from personal experiences and social issues to JavaScript control structures.

Almost as interesting as the site itself is that it’s built using Octopress, a new to me, blog aware, static site generator that claims to create a mobile first, “responsive design” layout.

Unlike traditional blogging platforms, such as WordPress, which generate pages dynamically from data in a database, a static site generator runs on your workstation and creates static HTML pages which it publishes to your web server. Serving static pages is a lot more efficent that dynamically generating them, which should make the site faster and able to handle more users with the same server hardware. Static pages should also be a lot more resistant to exploits and hacking than a complex webapp using a database and server side scripting.

Octopress is a user friendly framework for Jekyll, the static site generator powering Github Pages.  An added benefit of using a static site generator is that you can host your blog for free on Github, Dropbox or anywhere else you can publish file too. Octopress comes with quality documentation, tools (from Jekyll) for migrating from WordPress and other blog platforms and has a sizeable community of users.

I find Octopress intriguing though I”m not completely sold on the “mobile first” part. The idea of mobile first is that you send a minimal mobile friendly page with small images by default and then use front end logic to bring down full size images when a big screen is encountered.  The page weight of the Octopress pages I looked at averaged 300 or 400 KB regardless whether I used a 320 px wide viewport or a 1680 px one. 400 KB is no problem for smartphones and fast cheap data plans but not something you want to send your developing world feature phone readers who are paying by the KB. The good news is that Octopress and Jekyll are open source with an  active development community, so if there’s something I don’t like I can roll up my sleeves and change it.