Tuesday, March 12, 2013

Blurring Static And Dynamic Blogs


Static Blogging


I've discussed the pros and cons about static blogging many times before. In summary, the cons are that, well that your blog is static. No surprise there.

Fortunately, there are ways to push the limits of static blogging so that it is not quite so static.



Website Hosting


Unless you are self-hosting your Octopress or Jekyll blog, you are using another site to host your blog. I host mine on Github. They have a web server running 24x7 to host it. But that's not my problem. I just use their (free) services.

I understand that website hosting isn't a terribly exciting example of stretching the bubble of static blogging, but it is an example nonetheless. Dynamic blogs require specialized software running on their hosting computer to work. Static blogs tend to be able to run on generic web servers but there still must be a web server or there's no blog.



JavaScript Helps


Out of the box, Octopress comes with some features to show your most recent tweets as well as recent activity within your Github repositories. This is dynamic data that Octopress implements with some JavaScript.

Just to be clear, by dynamic data I mean that the data displayed on the page may change without a republication of the blog. I am not necessarily referring to a scrolling widget or something. Just dynamic data.

Conversely, JavaScript can be used to dynamically display static data. That is, data that is embedded in the source of the web page. Being that the data is embedded in the page's source at or before publication time, it is assuredly static data.

But client-side JavaScript (ie: JavaScript running in the user's browser) has its limits. For example, if you want to send a tweet whenever you add a new blog entry, client-side JavaScript is going to have a hard time at it.



Octopress Is Pretty Great

Jekyll Overview


I have simply fallen in love with Octopress. I think I mentioned previously that Octopress is an auto-configuration tool wrapped around Jekyll. And Jekyll is the technology behind Github pages. As such, if you use Jekyll for your blogging platform, you can preview your blog locally, push it to Github, and let Github do all the page serving.

This isn't actually as much work for the Github servers as you may think. Jekyll is a static blogging system with no CMS support. A static blog needs to be compiled whenever content is modified, but once compiled, the only thing the server needs to do is serve the pages. Dynamic blogging systems such as Wordpress and Joomla are programs that run on the server and work interactively with the web server to produce each page.


Configuration


Octopress's biggest addition to Jekyll is that it automagically configures Jekyll for you. I have found that configuring Jekyll is a bit of a pain. Jekyll decided to trade easy configuration for flexibility. This is a common decision in applications and one I can't really argue with.