Skip to content

Commit

Permalink
Simplify and improve the 404 page
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
karlstolley committed Sep 19, 2019
1 parent fdba950 commit 3097bd1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
10 changes: 0 additions & 10 deletions 404.html

This file was deleted.

7 changes: 3 additions & 4 deletions 404.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a>
{% endif %}
Expand Down

0 comments on commit 3097bd1

Please sign in to comment.