diff --git a/build/proxy/nginx.conf b/build/proxy/nginx.conf index e258490..568853e 100644 --- a/build/proxy/nginx.conf +++ b/build/proxy/nginx.conf @@ -45,6 +45,13 @@ http { location /auditorium/ { try_files $uri $uri/ /auditorium/index.html; } + + error_page 404 /404.html; + location = /404.html { + internal; + root /www/data; + add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive" always; + } } } diff --git a/homepage/content/pages/404.md b/homepage/content/pages/404.md index 5abceb5..5b0ceb5 100644 --- a/homepage/content/pages/404.md +++ b/homepage/content/pages/404.md @@ -1,7 +1,7 @@ Title: Page not found | offen description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. -save_as: 404/index.html -href: /404/ +save_as: 404.html +href: /404.html ![Page not Found](/theme/images/content-404.webp){:class="image-text-560-315"} diff --git a/homepage/pelicanconf.py b/homepage/pelicanconf.py index 2008b43..ffa8816 100644 --- a/homepage/pelicanconf.py +++ b/homepage/pelicanconf.py @@ -1,3 +1,5 @@ +from datetime import datetime +from calendar import month_name # If your site is available via HTTPS, make sure SITEURL begins with https:// RELATIVE_URLS = False @@ -7,6 +9,8 @@ PATH = 'content' TIMEZONE = 'Europe/Berlin' DEFAULT_LANG = 'en' +BUILD_DATE = '{} {}'.format(month_name[datetime.today().month], datetime.today().year) + # Feed generation is usually not desired when developing FEED_ALL_ATOM = None CATEGORY_FEED_ATOM = None diff --git a/homepage/theme/templates/base.html b/homepage/theme/templates/base.html index 1cd4b3b..18854a4 100644 --- a/homepage/theme/templates/base.html +++ b/homepage/theme/templates/base.html @@ -134,7 +134,7 @@