From 7d1b6134598caca417a09cf7f80618188c902d09 Mon Sep 17 00:00:00 2001 From: Abigail McCarthy <20771501+a-mccarthy@users.noreply.github.com> Date: Mon, 9 Nov 2020 12:05:40 -0500 Subject: [PATCH] Add custom 404 page to website (#3056) * Add custom 404 page to website Signed-off-by: Abigail McCarthy * point to repo issues Signed-off-by: Abigail McCarthy * remove 404 from title Signed-off-by: Abigail McCarthy --- site/layouts/404.html | 31 +++++++++++++++++++++++++++++++ site/layouts/_default/baseof.html | 12 +++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 site/layouts/404.html diff --git a/site/layouts/404.html b/site/layouts/404.html new file mode 100644 index 000000000..267af61c0 --- /dev/null +++ b/site/layouts/404.html @@ -0,0 +1,31 @@ +{{ define "siteHeader" }} + +{{ template "_default/site-header.html" . }} + +{{ end }} + +{{ define "title"}} +

Page Not Found

+{{ end }} + +{{ define "content"}} +

Whoops! It looks like we weren't able to find that page.

+ + +

+ +

If you can't find what you are looking for, try asking a question in our slack channel or filing an issue.

+ +{{ end }} + +{{ define "footer" }} + +{{ template "_default/footer.html" . }} + +{{ end }} diff --git a/site/layouts/_default/baseof.html b/site/layouts/_default/baseof.html index 32a40adb0..46d706fd2 100644 --- a/site/layouts/_default/baseof.html +++ b/site/layouts/_default/baseof.html @@ -9,17 +9,19 @@ {{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true) }} {{ $styles := resources.Get "styles.scss" | toCSS $options | resources.Fingerprint }} - {{ block "title" . }}{{ .Site.Title }} {{ .Page.Title }}{{ end }} + {{ block "siteTitle" . }}{{ .Site.Title }} {{ .Page.Title }}{{ end }}

- {{ .Render "site-header" }} + {{ block "siteHeader" . }} {{ .Render "site-header" }} {{ end }} {{ block "main" . }}
-

{{ .Title }}

+ {{ block "title" . }} +

{{ .Title }}

+ {{ end }}
@@ -33,8 +35,8 @@
{{ end }} - {{ .Render "footer" }} + {{ block "footer" . }}{{ .Render "footer" }}{{ end }} - \ No newline at end of file +