404 handler
This commit is contained in:
parent
62ecacd2cd
commit
f201d0f9ad
|
@ -3,6 +3,12 @@ server_name metanohi.name www.metanohi.name;
|
||||||
root /var/www/metanohi.name/web-serve;
|
root /var/www/metanohi.name/web-serve;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
error_page 404 /404.html
|
||||||
|
|
||||||
|
location /404 {
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
|
||||||
location ~ \.html$ {
|
location ~ \.html$ {
|
||||||
internal;
|
internal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ def markdown_to_html(input_file, output_dir):
|
||||||
pages.append((dir + '/' + uri,
|
pages.append((dir + '/' + uri,
|
||||||
os.path.normpath(os.path.join(base_dir, path, name))))
|
os.path.normpath(os.path.join(base_dir, path, name))))
|
||||||
|
|
||||||
builtins = ['/', '/about/', '/about/niels', '/misc/']
|
builtins = ['/', '/about/', '/about/niels', '/misc/', '/404']
|
||||||
pages = filter(lambda t: t[0] not in builtins, pages)
|
pages = filter(lambda t: t[0] not in builtins, pages)
|
||||||
pages_new = []
|
pages_new = []
|
||||||
for page in pages:
|
for page in pages:
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# 404
|
||||||
|
|
||||||
|
Try the next exit.
|
Loading…
Reference in New Issue