mirror of
https://github.com/kennethreitz/12factor.git
synced 2026-06-05 23:10:17 +00:00
19 lines
258 B
Ruby
19 lines
258 B
Ruby
require 'sinatra'
|
|
require 'maruku'
|
|
|
|
get '/' do
|
|
erb :home
|
|
end
|
|
|
|
get '/:factor' do |factor|
|
|
@factor = factor
|
|
erb :factor
|
|
end
|
|
|
|
helpers do
|
|
def render_markdown(file)
|
|
markdown = File.read("content/#{file}.md")
|
|
Maruku.new(markdown).to_html
|
|
end
|
|
end
|