Baking Blogs With MarsEdit
April 4th, 2011Brent Simmons has lately been singing the praises of baked, or statically published blogs. He encourages folks to switch from blogging systems that rely on dynamic scripting languages and database storage, in favor of systems that essentially just load plain HTML pages when a blog is visited.
Marco Arment was inspired by Brent’s plea, and according to comments on his Build and Analyze podcast, is strongly considering or is in fact starting development of a new baked blog system. This is especially significant considering that Marco is largely responsible for the development of the Tumblr blogging system, which would appear to be about as far as you can get from a baked blog type of system.
Brent focuses mostly on the performance aspect: dynamic scripting languages and databases are notoriously bad at fielding huge numbers of requests at once. They have to do too much “real work” in order to load a page, so if a blog suddenly gets very popular, all the work becomes too much and the site can simply buckle under the load.
Marco clearly respects the performance benefits of baked blogs, but seems to be even more interested in the control and data independence that are afforded by a simple, text-file-based blogging system. He noted in Build and Analyze that a major motivator for writing the Tumblr backup tool is he doesn’t like the idea of all his valuable writing being stored exclusively in a system that is out of his control.
To Bake or Not to Bake?
The arguments that Brent, Marco and others are making may have caused you to consider “going static.” But many of you are also deeply committed to using MarsEdit for writing and publishing. I’ll try to enumerate many of the solutions that are available to you, while explaining how MarsEdit would fit into that system’s workflow.
Option: Do Nothing
For completeness, let’s acknowledge that you may not need to do anything. If you’re satisfied with a hosted blogging system such as Blogger, WordPress.com, Tumblr, or Squarespace, then you should probably stick with what’s working. All of these services take away the headaches of managing your own blogging software, and due to their enormous scale, are unlikely to suffer performance problems even if you’re linked to by fifty Daring Fireballs at once.
Option: Add Caching
All of the performance benefits of static publishing can be achieved by using software that is smart enough to cache the dynamic content of a blog in temporary, static HTML files. As Marco mentioned, this can be done at a system-wide level with tools such as Varnish, or at a blog-level with plugins such as WP-SuperCache for WordPress. I personally use WordPress and WP-SuperCache to power Red Sweater Blog. Some blog systems, such as Movable Type, use a dynamic database for storing blog content, but regularly produce a statically published version of the site, essentially “caching” the content in a similar manner as this.
Option: Server-Side Baking
Essentially a variation of the caching mechanism described above, except that in completely static systems, the “baked” version of the blog is the canonical, reference version of the content of the blog. There is no database from which it’s derived. It’s the data. If you want to back up your blog, you simply copy the files.
Any server-side-baking blog system must offer some means for submitting posts to the system, where they are stored in their permanent, static format. Some systems may require you to FTP new post files up into the system, or to submit new post content via a web form, before it is baked into the blog. By implementing support for a standard API such as MetaWeblog, these systems can be made to interpret requests from apps like MarsEdit and store the content appropriately in the server-side static blog. Tom Insam recently explored this approach with the Jekyll blogging system, sharing a MetaWeblog implementation he wrote specifically to get it working with MarsEdit.
Option: Client-Side Baking
Of the many “blog systems” that MarsEdit supports, an increasingly terribly named one is Blosxom which was one of the earliest blogging systems, and unsurprisingly, also one of the simplest. Because Blosxom blogs are statically published with a simple one-file-per-post format, MarsEdit uses a local directory on your Mac to “publish” posts, and provides for a custom script to be run after any edits are made. In other words, the “Blosxom” system in MarsEdit could probably just as well be called “Static Publishing” because it writes a post to disk and then lets your script go wild with it afterwards. What you choose to do: rsync it, ftp it, copy it to S3, etc., is all more-or-less limited only by your imagination.
Keep in Touch
My mission as the developer of MarsEdit is to keep it useful for as many people as possible, without destroying the nature of the app itself. This means that I don’t jump through hoops to satisfy every whim of every user, but I do take feedback seriously and try to keep MarsEdit “with the times.” If you’re trying to use MarsEdit with a particular static publishing workflow, and it’s not working for you, let me know where it’s falling short. Maybe it’s something that would be relatively easy to tweak. Sure, this kind of support is mainly for geeks, but I happen to like geeks a lot!