forked from TonTon/tonton-web
[ config.ru ]
This commit is contained in:
parent
239b90227b
commit
87bdfa10a7
1 changed files with 22 additions and 0 deletions
22
config.ru
Normal file
22
config.ru
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
require_relative 'tonton_web'
|
||||||
|
require_relative 'modules/tonton-gollum/app'
|
||||||
|
|
||||||
|
use Rack::Session::Cookie, key: 'rack.session', secret: ENV.fetch('SESSION_SECRET')
|
||||||
|
|
||||||
|
wiki_options = {
|
||||||
|
universal_toc: false,
|
||||||
|
math: :mathjax,
|
||||||
|
css: true,
|
||||||
|
template_dir: 'modules/tonton-gollum/templates'
|
||||||
|
}
|
||||||
|
|
||||||
|
Precious::App.set(:gollum_path, 'modules/tonton-gollum/wiki')
|
||||||
|
Precious::App.set(:default_markup, :markdown)
|
||||||
|
Precious::App.set(:wiki_options, wiki_options)
|
||||||
|
|
||||||
|
app = Rack::URLMap.new(
|
||||||
|
'/' => TonTonWeb.new,
|
||||||
|
'/wiki' => TonTonWeb::Wiki.new('wiki')
|
||||||
|
)
|
||||||
|
|
||||||
|
run app
|
||||||
Reference in a new issue