Sha256: addafba74a857ea654adb808d014a6e3c72632ccdb6db98dde54b3beaf6b875e
Contents?: true
Size: 349 Bytes
Versions: 5
Compression:
Stored size: 349 Bytes
Contents
#! /usr/bin/env ruby %w( rubygems sinatra maruku ).each {|lib| require lib } get '/' do "welcome to my blog!" end get '/:name.html' do file = File.join File.dirname(__FILE__), 'posts', "#{ params['name'] }.mkd" if File.file? file Maruku.new(File.read(file)).to_html else status 404 "Not Found! #{ params['name'] }" end end
Version data entries
5 entries across 5 versions & 2 rubygems