Running Bespin on the Couch

Thursday May 21 2009

Sparked by a thread on the CouchDB Users mailing list with promises of beer and internet groupies, I've started a project to get Bespin running as a CouchApp on CouchDB. The long-term goal is to allow you to create and edit CouchApps from within Bespin, which is itself a CouchApp.

My first goal was to get Bespin's UI functioning as a CouchApp. Except for a few small things, that's already finished.

Here's a few screenshots of Bespin running as a CouchApp on my local CouchDB:

Index Index Page

Help Help Menu

Dashboard Dashboard

Editor Editor

Over the next few days I'll be focusing on porting their filesystem implementation to CouchDB and CouchApp conventions. If you'd like to get involved, fork my bespin_couch project and have at it! Also, if anyone knows how I can make the GitHub repo track upstream changes from Bespin's Mercurial repo I'd like to get that setup so I'm not just working off of a snapshot.

I haven't had time to integrate Disqus with the blog yet so for now if you have any comments please send me a message on GitHub or a reply to @bbrowning on Twitter.

Scribbish and Jekyll

Sunday May 17 2009

I really wanted a minimalistic, simple theme for my blog. After looking around a bit I settled on Scribbish, a popular theme in the Ruby world with packages for Typo, Mephisto, and WordPress. Unfortunately there's no package for Jekyll so I decided to try and port it myself.

Both Mephisto and Jekyll use the Liquid templating engine so the port was pretty straightforward. It's still a work-in-progress but the basics are finished.

Jekyll has an include tag to create reusable components but, unlike Mephisto's, you can't directly pass variables to the included file. This is fairly easy to workaround by using Liquid's assign tag or explicitly looping over a collection of objects instead of using Mephisto's shortcuts. For example:

Jekyll {% for post in site.posts %} {% include post.html %} {% endfor %}

Mephisto {% include 'article' with articles %}

The Jekyll include tag looks for an _includes directory at the root source directory. However, if you try to use the include tag from an already included file there's a bug where it looks for _includes/_includes/included_file.html. To workaround this for now I just created a symlink in the _includes directory to itself. cd _includes && ln -s . _includes

Take a look at this blog's source, particularly the _layouts and _includes directories, if you'd like to use the Scribbish theme for your own Jekyll-based blog.

Blogging With GitHub Pages

Saturday May 16 2009

I've always wanted a place to talk about the projects I'm working on but a traditional blog just didn't feel right. A few weeks ago I stumbled across GitHub Pages and my inner geek was instantly aroused. GitHub Pages is really just free static site hosting coupled with a tool called Jekyll to generate your site's contents based on layouts and Markdown or Textile formatted text. This is both simple and powerful. It removes the distractions and lets me focus on what really matters - the content.