Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The blog that's almost nothing - now using CouchDB
JavaScript Ruby
branch: master

This branch is 8 commits ahead, 2 commits behind jtulloch:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
config
gems/cache
lib
public
spec
views
.gitignore
Gemfile
README.rdoc
Rakefile
main.rb

README.rdoc

Scanty, a really small blog, now on the couch

Overview

Scanty is blogging software. It was created by Adam Wiggins for his blog: adam.blog.heroku.com

The main thing that has been changed with this version is the data-access. Rather than his default of Sequel, and a SQLite database, I have used CouchRest for accessing a CouchDB database.

It is not a blogging engine, but it's small and easy to modify, so it could be the starting point for your blog, too.

Features

  • Posts (shock!)

  • Tags

  • Markdown (via Maruku)

  • Ruby code syntax highlighting (via Syntax)

  • Atom feed

  • Comments via Disqus

  • Web framework = Sinatra

  • ORM = CouchRest

Dependencies

I like bundled gems, so this scanty utilisese bundler.

$ gem install bundler
$ gem bundle --cached

Setup

Change the Blog config struct in config/app_config.rb to your liking. For security purposes, change the admin password and the admin cookie key and value. These last two can be set to any random value you like, just choose something other than the default.

Then run the server:

$ bin/thin start -p 4567 -R config/rackup.ru

And visit: localhost:4567/

Log in with the password you selected, then click New Post. The rest should be self-explanatory.

In production, you'll probably want to run “rake start” to start (and restart) the server.

Database

This version of Scanty uses CouchDB. If you use the default CouchDB set-up, then you should only need to alter the database_name in the Blog config struct in main.rb. Otherwise, add the base-url of your CouchDB instance to url_base_database in the struct. If the database doesn't exist, it will be created automatically.

for installation instructions, find your platform on the following page: wiki.apache.org/couchdb/Installation

for more information on CouchDB, check out the rest of the wiki at wiki.apache.org/couchdb or the homepage at incubator.apache.org/couchdb

Gentoo has CouchDB 0.10.0 in portage now.

Comments

There are no comments by default. If you wish to activate comments, create an account and a website on Disqus (disqus.com) and enter the website shortname as the :disqus_shortname value in the Blog config struct.

Import data

Christopher Swenson has a Wordpress importer: github.com/swenson/scanty_wordpress_import

Other kinds of data can be imported easily, take a look at the rake task :import for an example of loading from a YAML file with field names that match the database schema.

Extras

I've added a few more features which weren't in the original Scanty:

  • there is now a checkbox when creating or editing a post which determines whether the post will be published. you will only see the unpublished posts when signed in. this allows unfinished posts to be saved without worrying about copying and pasting, etc.

This fork

I've removed

  • the ATOM feed now creates a separate feed URL for each user. The last_access property is updated for each user, whenever the feed is accessed. this allows the number of readers to be tracked, and old users to be removed, providing better accuracy.

As I couldn't get it to work. I think the before create callback is broken in couchrest.

Works with CouchDB 0.9.0+ & couchrest 0.34

Customize

There are no themes or settings beyond the basic ones in the Blog struct. Just edit the CSS or the code as you see fit.

Meta

Written by Adam Wiggins

Patches contributed by: Christopher Swenson Forked by: Nicholas Orr

Released under the MIT License: www.opensource.org/licenses/mit-license.php

github.com/adamwiggins/keen

adam.blog.heroku.com/

blog.jtulloch.com

nicholasorr.com

Something went wrong with that request. Please try again.