forked from TonTon/tonton-web
[ First commit ]
This commit is contained in:
commit
851303e97b
6 changed files with 167 additions and 0 deletions
25
tonton_web.rb
Normal file
25
tonton_web.rb
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
require 'gollum/app'
|
||||
require 'sinatra/flash'
|
||||
require "sqlite3"
|
||||
|
||||
class TonTonWeb < Sinatra::Base
|
||||
set :host_authorization, { permitted_hosts: ['localhost', 'mytonton.com.br'] }
|
||||
|
||||
set :sessions, true
|
||||
|
||||
get '/' do
|
||||
redirect "/home"
|
||||
end
|
||||
|
||||
get '/home' do
|
||||
markdown File.read('readme.md'), layout_engine: :erb, layout: true
|
||||
end
|
||||
|
||||
get '/building.md' do
|
||||
markdown File.read('building.md'), layout_engine: :erb, layout: true
|
||||
end
|
||||
|
||||
get '/**.md' do
|
||||
markdown request.path_info.to_sym
|
||||
end
|
||||
end
|
||||
Reference in a new issue