Skip to content

Commit 44c6d57

Browse files
F OpenNebula/one#7652: Custom 404 for 7.0 docs (#646)
This PR introduces a custom 404.html not found response page for broken links for the 7.0 documentation.
1 parent 3a55490 commit 44c6d57

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

layouts/_default/404.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{{ define "main" }}
2+
<style>
3+
.td-404 [role=main] {
4+
width: 100% !important; /* Full width (10/12 columns) */
5+
max-width: none !important;
6+
margin-right: 0 !important;
7+
}
8+
</style>
9+
<div class="row flex-xl-nowrap" style="width:100%">
10+
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
11+
12+
<div class="td-content">
13+
<h1>Page Not Found</h1>
14+
<p>The documentation for OpenNebula is regularly updated. It's possible that the page you are looking for has moved.</p>
15+
<p>You may find what you are looking for in one of the following sections:</p>
16+
17+
<ul>
18+
<li>
19+
<a href="{{ .Site.BaseURL }}/">Documentation Home</a>
20+
</li>
21+
{{ $paths := slice "getting_started/" "product/" "software/installation_process/" "software/upgrade_process/" "software/release_information/" "solutions/"}}
22+
{{ range $paths }}
23+
{{ with $.Site.GetPage . }}
24+
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
25+
{{ else }}
26+
{{/* Validation check */}}
27+
{{ errorf "404 Page: Link path not found: %s" . }}
28+
{{ end }}
29+
{{ end }}
30+
</ul>
31+
</div>
32+
</main>
33+
</div>
34+
{{ end }}

0 commit comments

Comments
 (0)