diff --git a/nginx/base.conf b/nginx/base.conf index b3dfb7f..310f0b1 100644 --- a/nginx/base.conf +++ b/nginx/base.conf @@ -3,6 +3,12 @@ server_name metanohi.name www.metanohi.name; root /var/www/metanohi.name/web-serve; index index.html; +error_page 404 /404.html + +location /404 { + internal; +} + location ~ \.html$ { internal; } diff --git a/scripts/transform-file.py b/scripts/transform-file.py index c1984c8..435567f 100755 --- a/scripts/transform-file.py +++ b/scripts/transform-file.py @@ -97,7 +97,7 @@ def markdown_to_html(input_file, output_dir): pages.append((dir + '/' + uri, 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_new = [] for page in pages: diff --git a/site/404.md b/site/404.md new file mode 100644 index 0000000..03c89cb --- /dev/null +++ b/site/404.md @@ -0,0 +1,3 @@ +# 404 + +Try the next exit.