From 6e058aa89ba3370ff5224f9516ed937d4e49662e Mon Sep 17 00:00:00 2001 From: tummychow Date: Fri, 1 Jan 2016 22:22:57 -0500 Subject: [PATCH] Fix 404 implementation Hugo has taken ownership of this now, which I like because no more alias hacking, but I had to clean up the mess I made. --- README.md | 2 -- content/fixed/404.md | 6 ------ layouts/404.html | 8 ++++++++ 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 content/fixed/404.md create mode 100644 layouts/404.html diff --git a/README.md b/README.md index 190696e..6130a75 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,6 @@ Hugo's universal config file is [`config.json`](config.json) (or YAML, or TOML). The original Lanyon had a layout for "pages", fixed content that didn't have a date. Lanyon-Hugo retains this concept, and refers to these pages as "fixed" (that's the content type, if you're familiar with Hugo concepts). Fixed pages will not display a date, only a title, and they will not be listed on the homepage of your site. Pages such as About (an example `about.md` has been lifted from the parent Lanyon) should generally be fixed. -You can alter the content of the custom 404 via [`fixed/404.md`](content/fixed/404.md). This is useful if you want a custom 404 for your GitHub Page. - ### Sidebar Links To indicate that a given piece of content should be linked in the sidebar, add a key `sidebar` to the front matter, and set it to `true`. See [`about.md`](content/fixed/about.md) for an example of this. You can pin content to the sidebar regardless of whether it is a post, or if it is fixed. diff --git a/content/fixed/404.md b/content/fixed/404.md deleted file mode 100644 index fe2c05d..0000000 --- a/content/fixed/404.md +++ /dev/null @@ -1,6 +0,0 @@ -{ - "aliases": ["/404.html"], - "title": "404" -} - -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/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..5ed6d5a --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,8 @@ +{{ partial "default_head.html" . }} + +
+

404

+

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

+
+ +{{ partial "default_foot.html" . }}