From 3097bd1d43dbc49d3e5fcc52df0e4d10f72b34f0 Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Wed, 18 Sep 2019 15:05:51 -0500 Subject: [PATCH] Simplify and improve the 404 page This removes the old `404.html` file (which Jekyll overwrote with the contents of `404.md` anyway), and properly uses the `page` layout that the old `404.md` was shoehorning into the content area. With the `page` layout in effect, the sidebar has been modified not to list the 404 page in the site contents. --- 404.html | 10 ---------- 404.md | 7 +++---- _includes/sidebar.html | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) delete mode 100755 404.html diff --git a/404.html b/404.html deleted file mode 100755 index 4bf3f7d8..00000000 --- a/404.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -layout: default -title: "404: Page not found" -permalink: 404.html ---- - -
-

404: Page not found

-

Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. Head back home to try finding it again.

-
diff --git a/404.md b/404.md index 5ab8821a..d8d612c5 100755 --- a/404.md +++ b/404.md @@ -1,9 +1,8 @@ --- -layout: default +layout: page title: "404: Page not found" permalink: 404.html --- -# 404: Page not found - -Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. [Head back home]({{ site.baseurl }}) to try finding it again. +Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. +[Head back home]({{ site.baseurl }}) to try finding it again. diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 51a5a446..908b4785 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -20,7 +20,7 @@ {% assign pages_list = site.pages | sort:"url" %} {% for node in pages_list %} - {% if node.title != null %} + {% if node.title != null and node.url != "/404.html" %} {% if node.layout == "page" %} {{ node.title }} {% endif %}