/eridu

A Sinatra blogging app for the classy developer

Primary LanguageRubyOtherNOASSERTION

Eridu

A Sinatra blogging app for the classy developer. Though inspired by Enki, it tries to be even cleaner, while offering more features.

Quick Start

git clone git://github.com/jhollinger/eridu.git eridu
cd eridu
bundle install    # Install all the required gems

# Copy and edit configuration files to taste
cp config/database.yml.template config/database.yml
cp config/eridu.yml.template config/eridu.yml

rake db:migrate   # Initialize or update the database
ruby eridu.rb     # Start the server at http://localhost:4567

Deploying to Production

Same as above, except instead of ruby eridu.rb, do:

cp config/thin.yml.template config/thin.yml

bundle exec thin start -C config/thin.yml

Philosophy

  • Sinatra is perfect for this; Ruby on Rails is overkill
  • /yyyy/mm/dd/post-title is a good URL for your posts
  • Atom is a good publishing protocol
  • Google does search better than you or I
  • Disqus does comments better (or at least easier) than you or I
  • You don’t need a plugin system when you’ve got a lean, clean code base
  • This is just your blog – Basic Auth is good enough for the admin area
  • Textile is awesome
  • Everyone wants awesome media upload, a responsive layout, and syntax highlighting
  • Few really want multiple sites, authors, skins and arcane templating languages
  • You should be running Ruby 2.0 by now

Framework choices aside, Eridu differs from its progenitor, Enki, mainly in the number of bundled features. These include optional Disqus integration, a responsive layout, simple yet elegent media management, syntax highlighting, and themes (each theme is just a css file). While Enki leaves these “extras” as an exercise to the reader, Eridu pragmatically includes these de facto necessities.

Syntax Highlighting with Coderay Plugin for Textile

# Single line
@[ruby]puts "It's ruby codez!"@

# Multi-line
bc[ruby].. puts "It's ruby codez!"
puts "and more"

puts "and more"

p. Back to a Textile paragraph

Compatibility

Tested on MySQL, Postgres, and SQLite. Heroku should be possible, but is untested.

License

Apache – See LICENSE

Admin design heavily inspired by Enki and Habari