| The dev blog for cloudno.de, a new Node.js hosting platform.

Our Octopress Blog Improved

Our blog is running on Octopress for some months now. Everything is great but some points needed to be improved:

  • The search box just redirected to Google Custom Search
  • The sidebar
  • Categories were not used
  • No comments

Octopress has a powerful plugin system and can be extended in many ways. Functions like "Categories" and "Comments" are built-in and need just to be activated.

The Search Box

Octopress is a static site generator and has no database to be queried for searches. The blog's default is just a redirection to Google Custom Search. This navigates away from the blog site and comes with Google Ads. Fortunately there is clever solution from Tapir for static sites. They crawl the RSS feed and generate a search index from it. The octopress-tapir plugin allows to query the index and to generate a search result page.

The Sidebar

There are lots of plugins for the sidebar. Octopress calls them asides. The octopress-category-list plugin outputs a list with counts of posts in every category. An additional "category-list page" can be created using rake with the following contents:

$ rake new_page['category-list']
$ vi source/category-list/index.markdown
<a href="/category-list">(Categories, alphabetically)</a>
<ul id="top-category-list">{% category_list [counter:true,include_all:true] %}</ul>

The new category list page can be linked from the main navigation by adding a link into the menu.

$ vi source/_includes/custom/navigation.html
<li><a href="{{ root_url }}/category-list">Category List</a></li>

Disqus Comments

Disqus Comments are embedded via an iframe. Everything needed is already built into Octopress and needs just to be configured. Sign up at disqus.com and choose a user name. That name needs to be entered into the _config.yml file.

$ vi config.yml
# Disqus Comments
disqus_short_name: cloudnode
disqus_show_comment_count: false