Skip to content
Create a gist now

Instantly share code, notes, and snippets.

DAZ4126 add pages code
get '/:page' do
if File.exists?('views/'+params[:page]+'.slim')
slim params[:page].to_sym
elsif File.exists?('views/'+params[:page]+'.md')
markdown params[:page].to_sym
else
raise error(404)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.