Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6b9b23fff8
Fetching contributors…

Cannot retrieve contributors at this time

file 33 lines (27 sloc) 1.216 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

require 'toto'

# Rack config
use Rack::Static, :urls => ['/css', '/js', '/images', '/favicon.ico'], :root => 'public'
use Rack::CommonLogger

if ENV['RACK_ENV'] == 'development'
  use Rack::ShowExceptions
end

#
# Create and configure a toto instance
#
toto = Toto::Server.new do
  #
  # Add your settings here
  # set [:setting], [value]
  #
  # set :author, ENV['USER'] # blog author
  # set :title, Dir.pwd.split('/').last # site title
  # set :root, "index" # page to load on /
  # set :date, lambda {|now| now.strftime("%d/%m/%Y") } # date format for articles
  # set :markdown, :smart # use markdown + smart-mode
  # set :disqus, false # disqus id, or false
  # set :summary, :max => 150, :delim => /~/ # length of article summary and delimiter
  # set :ext, 'txt' # file extension for articles
  # set :cache, 28800 # cache duration, in seconds

  set :date, lambda {|now| now.strftime("%B #{now.day.ordinal} %Y") }
end

run toto
Something went wrong with that request. Please try again.