README.rdoc in serious-0.2.0 vs README.rdoc in serious-0.2.1
- old
+ new
@@ -1,10 +1,10 @@
= Serious
Serious is a blog engine inspired by other filesystem-based engines like jekyll (http://jekyllrb.com/)
and toto (http://cloudhead.io/toto) and is based upon Sinatra and rack, thus can be hosted
-very easily (and for free) on heroku (http://heroku.com).
+very easily (and for free) on heroku (http://heroku.com).
The articles are stored in plain text files with an opinionated naming scheme which is used for
getting the date and permalink of your article: <code>articles/2010-02-14-will-you-be-my-valentine.txt</code>
The actual content of the article is lazy-loaded only when accessed, so things don't get messy when a lot
@@ -37,15 +37,25 @@
Install the gem:
sudo gem install serious
-Since a basic template and css are provided inside the gem, all you've got to do is set up a directory
-for your new blog, create an articles folder, a config.ru and (for heroku), a .gems file.
+You can use the supplied generator using the <code>serious</code> executable provided with the gem.
+Type <code>serious</code> in your shell to see the available options.
-The directory structure would be something like:
+By default the generator will create the app with gem-based public and views directories and initialize
+a git repository. To host your app on heroku instantly, supply the --heroku option, which will use
+the heroku gem to create your app and push it to heroku via git. Type:
+ serious my-fancy-blog --heroku
+
+And you can go to http://my-fancy-blog.heroku.com to see your new blog!
+
+== The setup
+
+The directory basic directory structure of your Serious site would be something like this:
+
serious_blog/
- articles
- articles/2010-02-14-will-you-be-my-valentine.txt
- config.ru
- .gems
@@ -58,38 +68,60 @@
Serious.set :url, 'http://mysweetlittleblog.heroku.com'
run Serious
The .gems file if you want to host on heroku:
- stupid_formatter --version '>= 0.2.0'
- serious --version '>= 0.1.3'
+ stupid_formatter
+ serious
Note that sinatra is not included in the gemfile since heroku has it installed by default, but serious
will install it as a gem dependency on other systems as well.
+== Creating heroku app manually
+
Assuming you've got the heroku gem installed and set up and you've set up git for your blog with
-<code>git init</code>, you can now do:
+<code>git init</code> or sticked with the generator, which created your git repo, you can now do:
heroku create mysweetlittleblog
git push heroku master
Point your browser to the url, and bang, you're ready!
-You might also want to test your blog locally. Use thin (<code>sudo gem install thin</code>) with:
+== Running with thin
+You might also want to test your blog locally or host it with thin.
+Use thin (<code>sudo gem install thin</code>) with:
+
thin -R config.ru start
Go to <code>localhost:3000</code> and enjoy.
== Archives
The whole archives can be accessed at <code>/archives</code>. Archives by year, month and date
are available at <code>/2009</code> (all of 2009), <code>/2009/05</code> (May 2009),
<code>/2009/05/15</code> (May 15th 2009).
-== Configuration
+== Comments with disqus
+You can activate comments for articles very easily with disqus (http://disqus.com) by setting
+the <code>disqus</code> property to your disqus-id (e.g. 'myfancysite'). Disqus developer mode will
+be automatically activated for requests served by http://localhost so you can preview your settings
+and layout properly.
+
+ Serious.set :disqus, 'yourid'
+
+== Google Analytics
+
+You can activate Google Analytics by setting the <code>google_analytics</code> property to your
+tracker id (something like 'UA-123123-5'). The required code will then be included to your site.
+For requests served from http://localhost, the inclusion is skipped.
+
+ Serious.set :google_analytics, 'UA-123123-5'
+
+== Configuration options
+
Inside your config.ru, you can customize the settings for your Serious site.
=== Custom view templates or public folder
==== Changing the path to the public folder
@@ -151,11 +183,42 @@
Well, your site has to know where it lives to provide proper links in your atom feed. Configure this
with the url setting, which defaults to 'http://localhost:3000'
Serious.set :url, 'http://localhost:3000'
+
+=== The date format
+
+There is a helper in the Date class for formatting dates according to the configuration specified
+in Serious.date_format and which is used in the frontend. It defaults to "%B %o %Y", which expands
+to (i.e.) 'December 24th, 2009'. Notice that %o is a custom flag that is not built-in in the default
+strftime method of Date. It returns the ordinal name of the day. Customize with:
+
+ Serious.set :date_format, "%Y-%m-%d"
+=== Disqus comments
+
+To enable disqus comments, specify your disqus id with the disqus property. Disqus is disabled
+by default. See section above for more information on disqus and comments.
+
+ Serious.set :disqus, 'yourdisqusid'
+
+=== Google Analytics
+
+To enable google analytics, specify your tracker id at the property <code>google_analytics</code>.
+See section above for more information on Google Analytics.
+
+ Serious.set :google_analytics, 'UA-123123-5'
+
+=== Custom feed url in layout
+
+If you want to specify a different feed url for the head link tag, for example to point your readers
+to Feedburner, you can do so by specifiyng the <code>feed_url</code> option and setting up your
+feed to be burned by feedburner based upon <code>http://yoururl.com/atom.xml</code>.
+
+ Serious.set :feed_url, 'http://feeds.feedburner.com/myfeedurl'
+
=== Displayed items
You can specify how many items you want displayed across your site:
==== Amount of feed items
@@ -199,17 +262,13 @@
== TODO
* static pages
* make summary delim configurable
-* beautifuller date formatting in frontend
* make caching better
* make it possible to host in subdirectories
* valid xhtml in demo setup
-* generator for basic app?
* rake tasks for generating new posts and validating existing
-* disqus (optional)
-* google analytics (optional)
* allow for choice between erb/haml templates
== Note on Patches/Pull Requests
* Fork the project.