mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
catch missing blog post
This commit is contained in:
parent
748e27120f
commit
b4e768d392
1 changed files with 3 additions and 1 deletions
4
app.rb
4
app.rb
|
@ -76,7 +76,9 @@ end
|
||||||
|
|
||||||
get '/blog/:article' do |article|
|
get '/blog/:article' do |article|
|
||||||
# expires 500, :public, :must_revalidate
|
# expires 500, :public, :must_revalidate
|
||||||
return File.read File.join(DIR_ROOT, 'public', 'sites', 'blog', "#{article}.html")
|
path = File.join DIR_ROOT, 'public', 'sites', 'blog', "#{article}.html"
|
||||||
|
pass if !File.exist?(path)
|
||||||
|
File.read path
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/new' do
|
get '/new' do
|
||||||
|
|
Loading…
Add table
Reference in a new issue