From e137363d61a65cbfb5f53be9712a4e3667837731 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Sun, 6 Oct 2019 13:52:45 +0200 Subject: [PATCH] further clean up routing logic --- .gitignore | 1 - build/proxy/nginx.conf | 4 ++++ homepage/content/pages/404.md | 1 + homepage/theme/templates/base.html | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 75e3c50..e86e3a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .vscode .serverless node_modules/ -public/ *.pem venv/ diff --git a/build/proxy/nginx.conf b/build/proxy/nginx.conf index f3b21b0..9363c38 100644 --- a/build/proxy/nginx.conf +++ b/build/proxy/nginx.conf @@ -59,6 +59,10 @@ http { proxy_redirect off; } + location /favicon.ico { + root /www/data/theme/images; + } + error_page 404 /404.html; location = /404.html { internal; diff --git a/homepage/content/pages/404.md b/homepage/content/pages/404.md index 6f478be..db7f3d3 100644 --- a/homepage/content/pages/404.md +++ b/homepage/content/pages/404.md @@ -2,6 +2,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.html href: /404.html +no_stats: true ![Page not Found](/theme/images/content-404.webp){:class="image-text-560-315"} diff --git a/homepage/theme/templates/base.html b/homepage/theme/templates/base.html index 18854a4..7b64464 100644 --- a/homepage/theme/templates/base.html +++ b/homepage/theme/templates/base.html @@ -22,7 +22,7 @@ {% assets filters="cssmin", output="css/style.min.css", "css/normalize.css", "css/fonts.css", "css/style.css" %} {% endassets %} - {% if OFFEN_ACCOUNT_ID %} + {% if OFFEN_ACCOUNT_ID and not page.no_stats %} {% endif %}