diff options
author | tummychow <tummychow@users.noreply.github.com> | 2016-01-02 06:22:57 +0300 |
---|---|---|
committer | tummychow <tummychow@users.noreply.github.com> | 2016-01-02 06:31:18 +0300 |
commit | 6e058aa89ba3370ff5224f9516ed937d4e49662e (patch) | |
tree | ef75c9dbf878bca4347477cb10fe1fa0c9f12dea | |
parent | 9240acf0bf874dec07a84b8779e736e93bc6a43c (diff) |
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.
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | content/fixed/404.md | 6 | ||||
-rw-r--r-- | layouts/404.html | 8 |
3 files changed, 8 insertions, 8 deletions
@@ -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" . }} + +<div class="page"> + <h1 class="page-title">404</h1> + <p>Sorry, we’ve misplaced that URL or it’s pointing to something that doesn’t exist. <a href="/">Head back home</a> to try finding it again.</p> +</div> + +{{ partial "default_foot.html" . }} |