Skip to content

Commit

Permalink
custom 404
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Calcote <[email protected]>
  • Loading branch information
leecalcote committed Oct 31, 2023
1 parent 9f840d1 commit 79d4bd2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 10 deletions.
8 changes: 5 additions & 3 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,17 @@ footer_about_disable = false
navbar_logo = true
# Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage.
navbar_translucent_over_cover_disable = false

# Sidebar Options
# Enable to show the side bar menu in its compact state.
sidebar_menu_compact = false
sidebar_menu_compact = true
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
sidebar_search_disable = false
# Enable to show toggle arrows
sidebar_menu_foldable = true
sidebar_menu_foldable = false
# Limit the number of levels deep the menu displays
# ul_show=1


# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
Expand Down
44 changes: 37 additions & 7 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
{{ define "main" -}}
<div class="td-content">
<h1>Not found</h1>
<p>Oops! This page doesn't exist. Try going back to the <a href="{{ "" | relURL }}">home page</a>.</p>
<p>You can learn how to make a 404 page like this in <a href="https://gohugo.io/templates/404/">Custom 404 Pages</a>.</p>
</div>
{{- end }}
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
<header>
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
{{ partial "sidebar.html" . }}
</aside>
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "page-meta-links.html" . }}
{{ partial "toc.html" . }}
{{ partial "taxonomy_terms_clouds.html" . }}
</aside>
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
{{ partial "version-banner.html" . }}
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ block "main" . }}
<h1>Not found</h1>
<p>Oops! This page doesn't exist.</p>
<p>Please let us know about <a href="https://github.com/layer5io/docs/issues/new/choose">this issue</a> and return to the <a href="{{ "" | relURL }}">home page</a>.</p>
{{ end }}
</main>
</div>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "scripts.html" . }}
</body>
</html>

0 comments on commit 79d4bd2

Please sign in to comment.