require 'rblosxom/base' module Rblosxom class Main < Base get '/?' do set_common_variables @log.info "Main start" @log.debug "Main debug" index_file = File.expand_path("#{@root}/#{@config["datadir"]}/main.mkd") unless File.exist?(index_file) index_file = File.expand_path("#{@root}/README.mkd") end content = File.read(index_file) haml :index, :layout => true, :locals => { :content => content } end end end # vim: ft=ruby:fenc=utf-8:sw=4:ts=4:sts=4:et: # main.rb end here