From e933c24aca5fb833ef2f653c164f1e7ed0cddec7 Mon Sep 17 00:00:00 2001 From: kendo5731 Date: Sat, 6 Feb 2016 16:58:34 +0100 Subject: [PATCH] feat(): add a custom 404 page --- README.md | 1 - data/translations/en-US.yaml | 4 +++- data/translations/fr-FR.yaml | 2 ++ layouts/404.html | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 83b9dba..e4c7258 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,5 @@ A theme for [Hugo](https://gohugo.io/), inspired by Atom editor. This repo is a work in progress, there is still work to do, contributions are welcome ! -- Add custom 404.html - Support for code highlighting - Conventional CHANGELOG.md diff --git a/data/translations/en-US.yaml b/data/translations/en-US.yaml index 83c7401..993671a 100644 --- a/data/translations/en-US.yaml +++ b/data/translations/en-US.yaml @@ -2,4 +2,6 @@ mostrecentposts: Most recent posts tags: Tags categories: Categories datepublished: Published -root: Root \ No newline at end of file +root: Root +gotoroot: Go to root +notfoundmsg: Sorry, page not found ... :( \ No newline at end of file diff --git a/data/translations/fr-FR.yaml b/data/translations/fr-FR.yaml index 0058478..f5659d0 100644 --- a/data/translations/fr-FR.yaml +++ b/data/translations/fr-FR.yaml @@ -3,3 +3,5 @@ tags: Tags categories: Catégories datepublished: Publié le root: Racine +gotoroot: Aller à la racine +notfoundmsg: Désolé, cette page n'a pas été trouvée ... :( diff --git a/layouts/404.html b/layouts/404.html index e69de29..7b752ef 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -0,0 +1,4 @@ +{{ partial "top.html" . }} +

{{ ( index $.Site.Data.translations $.Site.Params.locale ).notfoundmsg }}

+

{{ ( index $.Site.Data.translations $.Site.Params.locale ).gotoroot }}

+{{ partial "bottom.html" . }}