Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 114 lines (77 sloc) 4.515 kB
7fcffb6 initial commit
James OKelly authored
1 RubySlippers, the smartest blogging engine in all of Oz!
f1ea1a4 updated integration tests
James OKelly authored
2 ================
7fcffb6 initial commit
James OKelly authored
3 [website](http://ruby-slippers.heroku.com)
4
f1ea1a4 updated integration tests
James OKelly authored
5 RubySlippers is a git powered blog engine that aims to be simply to modify and more importantly, simple and quick and free to get a blog going. I am currently using it to run several blogs in production, you can see one in action here:
6
7 [www.ninjaconfessions.com](www.ninjaconfessions.com) - My ruby blog
5624db7 updated readme
James OKelly authored
8
7fcffb6 initial commit
James OKelly authored
9 Introduction
10 ------------
11
5624db7 updated readme
James OKelly authored
12 ### To set up a new blog
7fcffb6 initial commit
James OKelly authored
13
14 $ git clone git://github.com/dreamr/ruby-slippers.git myblog
15 $ cd myblog
16 $ gem install bundler
17 $ bundle
18 $ rake install
19 $ -> Blog name: My new blog
20 $ Installing your blog to my-new-blog
21 $ Blog installed!
22
23
5624db7 updated readme
James OKelly authored
24 ### To create an article
7fcffb6 initial commit
James OKelly authored
25
26 $ rake new
27 $ -> Title: My new blog post!
28 $ Creating and opening my-new-blog-post (opens in your text editor!)
29 $ rake publish (commits, pushes, publishes then opens in your browser!)
30
31 Deployment
32 ==========
33
040ddb5 updated readme
James OKelly authored
34 ### On Heroku
7fcffb6 initial commit
James OKelly authored
35
5624db7 updated readme
James OKelly authored
36 RubySlippers comes with a basic rackup file. To start it up locally do:
7fcffb6 initial commit
James OKelly authored
37
040ddb5 updated readme
James OKelly authored
38 $ git remote add origin git@heroku:you-app-name
39 $ git commit -m "my new awesome commit"
40 $ git push
7fcffb6 initial commit
James OKelly authored
41
040ddb5 updated readme
James OKelly authored
42 ### On your own server
7fcffb6 initial commit
James OKelly authored
43
5624db7 updated readme
James OKelly authored
44 Once you have created the remote git repo, and pushed your changes to it, you can run RubySlippers with any Rack compliant web server, such as **thin**, **mongrel** or **unicorn**.
7fcffb6 initial commit
James OKelly authored
45
040ddb5 updated readme
James OKelly authored
46 I use [shotgun](https://github.com/rtomayko/shotgun):
47
48 $ shotgun
49
7fcffb6 initial commit
James OKelly authored
50 With thin, you would do something like:
51
52 $ thin start -R config.ru
53
54 With unicorn, you can just do:
55
56 $ unicorn
57
58
5624db7 updated readme
James OKelly authored
59 #### Configuration
7fcffb6 initial commit
James OKelly authored
60
61 You can configure ruby-slippers, by modifying the _config.ru_ file. For example, if you want to set the blog author to 'John Galt',
62 you could add `set :author, 'John Galt'` inside the `RubySlippers::Engine::App.new` block. Here are the defaults, to get you started:
63
64 set :author, ENV['USER'] # blog author
65 set :title, Dir.pwd.split('/').last # site title
66 set :url, 'http://example.com' # site root URL
67 set :prefix, '' # common path prefix for all pages
68 set :root, "index" # page to load on /
69 set :date, lambda {|now| now.strftime("%d/%m/%Y") } # date format for articles
70 set :markdown, :smart # use markdown + smart-mode
71 set :disqus, false # disqus id, or false
72 set :summary, :max => 150, :delim => /~\n/ # length of article summary and delimiter
73 set :ext, 'txt' # file extension for articles
74 set :cache, 28800 # cache site for 8 hours
75
76 set :to_html do |path, page, ctx| # returns an html, from a path & context
60823d1 updated engine to use html.erb instead of rhtml
James OKelly authored
77 ERB.new(File.read("#{path}/#{page}.html.erb")).result(ctx)
7fcffb6 initial commit
James OKelly authored
78 end
79
80 set :error do |code| # The HTML for your error page
81 "<font style='font-size:300%'>A large house has landed on you. You cannot continue because you are dead. <a href='/'>try again</a> (#{code})</font>"
82 end
83
f1ea1a4 updated integration tests
James OKelly authored
84 Philosophy
85 ----------
86
87 RubySlippers is based on [Toto](http://github.com/cloudhead/toto) and aims to achieve their goals as well as our own. Hosting a ruby based free blog shouldn't be hard. We want to take that a step further and say it should be easy. Easy as pie. Easy as my best friend's Mom. Easy as a 1 click installer.
88
89 Oh yeah, MRI, bytecode whatever. If it is Ruby, it should run.
90
91 ### How it works
92
93 - Article management is done with a text editor and git
94 * stored as _.txt_ files, with embeded metadata (in yaml format).
95 * processed through a markdown converter (rdiscount) by default.
96 * can have tags
97 * can have images
98 * can be browsed by date, or tags
99 * comments are handled by [disqus](http://disqus.com)
100 - built for easy use with _ERB_.
101 - built right on top of _Rack_.
102 - built to take advantage of _HTTP caching_.
103 - built with _heroku_ in mind.
104
105
106 RubySlippers comes with a basic default theme for you to mangle. I hope to release more themes shortly and will accept your submitted themes.
107
5624db7 updated readme
James OKelly authored
108 ### Thanks
7fcffb6 initial commit
James OKelly authored
109
110 * To heroku for making this easy as pie.
111 * To the developers of [Toto](http://github.com/cloudhead/toto), for making such an awesome minimal blog engine in Ruby.
112
113 Copyright (c) 2011 dreamr. See LICENSE for details.
Something went wrong with that request. Please try again.