Chapa Simóide. More info. Temporary route matching fix in app.rb, looking for a better, simpler solution.

This commit is contained in:
Mateus Cezário Barreto 2025-11-18 22:49:59 -03:00
commit a0ff7fa0a9
8 changed files with 31 additions and 13 deletions

10
app.rb
View file

@ -20,11 +20,11 @@ class TonTonWeb::App < Sinatra::Base
markdown request.path_info.to_sym, layout_engine: :erb, layout: true
end
get '/chapa-sigmoide/readme' do
erb request.path_info.to_sym, layout_engine: :erb, layout: :chapa_sigmoide
end
get '/chapa-sigmoide/:name' do
markdown request.path_info.to_sym, layout_engine: :erb, layout: :chapa_sigmoide
if request.path_info.end_with? '.markdown'
markdown request.path_info.sub('.markdown', '').to_sym, layout_engine: :erb, layout: :chapa_sigmoide
elsif request.path_info.end_with? '.erb'
erb request.path_info.sub('.erb', '').to_sym, layout_engine: :erb, layout: :chapa_sigmoide
end
end
end