[ More information ]

This commit is contained in:
Mateus Cezário Barreto 2025-11-05 20:46:00 -03:00
commit 76608a4184
5 changed files with 86 additions and 17 deletions

View file

@ -8,18 +8,10 @@ class TonTonWeb < Sinatra::Base
set :sessions, true
get '/' do
redirect "/home"
redirect "/readme.md"
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
get '/:name' do
markdown File.read(params['name']), layout_engine: :erb, layout: true
end
end