From 13591d08a2263ba197d27f64d542fa69e5b8a24f Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Wed, 1 Jul 2020 13:47:35 -0400 Subject: [PATCH] 404 page rework, including title fix to the title (#330) - Closes #329. Fix 404-page title so that we can find 404 pages more easily using analytics. - Simplify page, and make it a bit more DRY -- avoid repeating links that are in main nav and footer. --- config.yaml | 1 + layouts/404.html | 71 +++++++++++++++++++----------------------------- 2 files changed, 29 insertions(+), 43 deletions(-) diff --git a/config.yaml b/config.yaml index 3cd6090..6797585 100644 --- a/config.yaml +++ b/config.yaml @@ -5,6 +5,7 @@ disableKinds: [taxonomy, taxonomyTerm] pygmentsCodeFences: true params: + repo: https://github.com/grpc/grpc.io locale: en_US grpc_release_tag: v1.30.0 grpc_java_release_tag: v1.30.1 diff --git a/layouts/404.html b/layouts/404.html index 1b2e460..4de910b 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,58 +1,43 @@ -{{ define "main" }} -
+{{ define "title" -}} +404 Page not found - {{ site.Title -}} +{{ end -}} + +{{ define "main" -}} +{{ $newIssuePath := "issues/new?title=Unexpected%20page-not-found%20error&body=URL%3A%20%0AExpected%20page%3A%20" -}} +{{ $newIssueUrl := printf "%s/%s" site.Params.repo $newIssuePath -}} + +
-

- - 404 - - - ! - -

- -

+

Page not found

+

+ 404 +

-
+

- Sorry, but that link wasn't found. Perhaps you were looking for one of the following: + The page that you requested doesn't exist. +

+

+ Check the URL's spelling. +

+

+ If you think that the page should exist, + create an issue. +

+

+ + Homepage +

- - - Main page - - -
- - - Documentation - - -
- - - Blog - - -
- - - Community - - -
- - - FAQ -
-{{ end }} +{{ end -}}