From ccc36b7d453fffa5ab89fc668aaf12512229e4d0 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 22 Jan 2019 16:27:26 +0100 Subject: [PATCH] Replace 404.md with a 404.html template --- blog/content/pages/404.md | 13 ------------- blog/templates/404.html | 12 ++++++++++++ blog/templates/second-edition/base.html | 4 +++- 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 blog/content/pages/404.md create mode 100644 blog/templates/404.html diff --git a/blog/content/pages/404.md b/blog/content/pages/404.md deleted file mode 100644 index a6ff4dcf..00000000 --- a/blog/content/pages/404.md +++ /dev/null @@ -1,13 +0,0 @@ -+++ -title = "Page not found" -path = "404.html" -template = "plain.html" -+++ - -Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. - -[Head back home](/) to try finding it again. - -If you followed a link on this site, please [report it]! - -[report it]: https://github.com/phil-opp/blog_os/issues diff --git a/blog/templates/404.html b/blog/templates/404.html new file mode 100644 index 00000000..ac8b05b7 --- /dev/null +++ b/blog/templates/404.html @@ -0,0 +1,12 @@ +{% extends "second-edition/base.html" %} + +{% block title %}Page not found | {{ config.title }}{% endblock title %} + +{% block main %} +

Page not found

+

Sorry, this address is not valid.

+ +

Go to the index page.

+ +

If you followed a link on this site, please report it!

+{% endblock main %} diff --git a/blog/templates/second-edition/base.html b/blog/templates/second-edition/base.html index da56d3ef..4d76d8f3 100644 --- a/blog/templates/second-edition/base.html +++ b/blog/templates/second-edition/base.html @@ -9,7 +9,9 @@ - + {% if current_url %} + + {% endif %}