From fda8cb9d2043d42c4972e3b4fa89427939dc7069 Mon Sep 17 00:00:00 2001 From: Zhai2333 Date: Sun, 9 Jun 2019 17:52:52 +0800 Subject: [PATCH 1/2] [+] add: 404 Page --- i18n/en.toml | 4 ++++ i18n/zh-CN.toml | 4 ++++ layouts/404.html | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 i18n/en.toml create mode 100644 i18n/zh-CN.toml create mode 100644 layouts/404.html diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..64aebda --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,4 @@ +[404-text] +other = "404 Not Found." +[404-link] +other = "Go Back" \ No newline at end of file diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml new file mode 100644 index 0000000..d2f6e30 --- /dev/null +++ b/i18n/zh-CN.toml @@ -0,0 +1,4 @@ +[404-text] +other = "文件找不到了。" +[404-link] +other = "返回" \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..5a41a14 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,11 @@ +{{ define "main" }} +
+

404!

+ +
+ {{ i18n "404-text" }}
+ {{ i18n "404-link" }} → +
+ +
+{{ end }} From 1d9856db286f6daca21c78a96fa0eadc7c7a8daf Mon Sep 17 00:00:00 2001 From: Zhai2333 Date: Wed, 28 Aug 2019 15:37:08 +0800 Subject: [PATCH 2/2] [^] upd: Update 404 --- README.md | 2 ++ i18n/en.toml | 4 ---- i18n/zh-CN.toml | 4 ---- layouts/404.html | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 i18n/en.toml delete mode 100644 i18n/zh-CN.toml diff --git a/README.md b/README.md index d07e40a..27f282d 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,8 @@ paginate = 5 menuMore = "Show more" readMore = "Read more" readOtherPosts = "Read other posts" + missingContentMessage = "Page not found." + missingBackButtonLabel = "Go Back" [languages.en.params.logo] logoText = "Terminal" diff --git a/i18n/en.toml b/i18n/en.toml deleted file mode 100644 index 64aebda..0000000 --- a/i18n/en.toml +++ /dev/null @@ -1,4 +0,0 @@ -[404-text] -other = "404 Not Found." -[404-link] -other = "Go Back" \ No newline at end of file diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml deleted file mode 100644 index d2f6e30..0000000 --- a/i18n/zh-CN.toml +++ /dev/null @@ -1,4 +0,0 @@ -[404-text] -other = "文件找不到了。" -[404-link] -other = "返回" \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html index 5a41a14..d69471a 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -3,8 +3,8 @@

404!

- {{ i18n "404-text" }}
- {{ i18n "404-link" }} → + {{ .Site.Params.missingContentMessage }}
+ {{ .Site.Params.missingBackButtonLabel }} →