Last updated June 8th 2009: Bloggity version 1.0 has landed! This blog has been completely revised for the occasion.
With a spec (and funding) courtesy of Goldstar, I finally made time to incorporate many of the features I’d been hoping to add for the last year. Here is the current featureset:
- Rails 2.3 compatible (also should be compatible with Rails 2.0-2.2, if you use the Engines plugin and copy the routes into your routes file)
- Drop-in installation, including rake tasks to automate creating the necessary database tables, and moving the necessary assets into your existing project.
- WYSIWYG editor for writing blogs
- Support for AJAX uploading of images and/or assets of any kind with your blog post
- URLs formatted using blog titles for good SEO (e.g., http://mysite.com/blog/founder/welcome_to_my_blog)
- Create and maintain one or more blogs in a Rails app (e.g., a main blog, CEO blog, and user blogs)
- User commenting, built in support for gravatars
- Separate, configurable persmissions for writing, commenting on, and moderating comments for blogs
- RSS 2.0 feeds (with built in customizability for Feedburner)
- Ability to use custom stylesheets on a per-blog basis (i.e., the Founder’s blog can use different styling than the user blogs)
- Ability to tag blog posts, and filter by tag
- Ability to categorize blog posts
- Blogs can be saved in draft mode before publishing
- Model & controller test suite
- Docs and an active git project!
Bloggity 1.0 has been tested with Rails 2.3. In Rails 2.3, it shouldn’t need any plugins besides will_paginate. It should also work in Rails 2.0-2.2, but you’ll need to copy the routes into your routes file, since routes were extracted from plugins in 2.3. Other monkeying around might also be needed, if you have issues installing on pre-2.3 Rails, please drop a line in the comments.
FCKEditor is used for the WYSIWYG editor. This is included with the plugin, and shouldn’t affect your existing Rails install (plugin puts its assets in a separate directory). For the image uploading, jQuery is used (since it works via AJAX). This is also included with the plugin, and doesn’t need to be used elsewhere on your site.
- Run “script/plugin install firstname.lastname@example.org:wbharding/bloggity.git” to grab Bloggity and put it in vendor/plugins/bloggity
- Run “rake bloggity:bootstrap_db” from your application’s base directory
- Run “rake bloggity:bootstrap_bloggity_assets” to copy the images and stylesheets used with bloggity into your apps /public/stylesheets/bloggity and /public/images/bloggity directories.
- Take a gander at bloggity/lib/bloggity/user_init.rb. This shows the methods that bloggity will use to interface with your user model (for blog permissions and such). Implement these in a sensible way in your user model. Don’t forget to copy the blog associations into your user. (If you prefer, you could also copy the UserInit into a lib directory of yours, fill in the methods, and include it in your User model directly)
- There are two methods in bloggity/lib/bloggity/bloggity_application.rb: current_user and login_required. Implement these in your application_controller.rb if you haven’t already.
And you’re done!
In the Wild
An earlier version of Bloggity can be seen in the wild at the Bonanzle blog. Bloggity 1.0, with its support for tagging, categorization, and gravatars, actually exceeds the features you’ll see at Bonanzle.
Here are a couple shots of Bloggity in action with its default styles.
I haven’t built in support yet for upgrading from pre-1.0 versions of Bloggity, because, well, just about everything changed with the release of 1.0, not the least of which is the names for several models. However, when Bonanzle moves from Bloggity 0.5 to 1.0, I’ll post how we went about it here.
Please add your bug reports to the comments section and I’ll commit changes as you find them.