Skip to content

Commit 3097bd1

Browse files
committed
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.
1 parent fdba950 commit 3097bd1

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

404.html

-10
This file was deleted.

404.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
layout: default
2+
layout: page
33
title: "404: Page not found"
44
permalink: 404.html
55
---
66

7-
# 404: Page not found
8-
9-
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.
7+
Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
8+
[Head back home]({{ site.baseurl }}) to try finding it again.

_includes/sidebar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
{% assign pages_list = site.pages | sort:"url" %}
2222
{% for node in pages_list %}
23-
{% if node.title != null %}
23+
{% if node.title != null and node.url != "/404.html" %}
2424
{% if node.layout == "page" %}
2525
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a>
2626
{% endif %}

0 commit comments

Comments
 (0)