Skip to content

Commit 71fe8c4

Browse files
oschwaldclaude
andcommitted
Add a 404 page layout
Hugo's built-in fallback renders an empty `<main></main>` for the 404 page. Provide a minimal "Page not found" body with a link back to the site home, reusing the Charter/forest-green design tokens from the main layout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8053f50 commit 71fe8c4

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

docs/layouts/404.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>Page not found | {{ .Site.Title }}</title>
7+
<style>
8+
:root {
9+
--fg: #2d2d2d;
10+
--bg: #faf9f7;
11+
--accent: #1a6b50;
12+
--heading: #1a1a1a;
13+
}
14+
15+
body {
16+
font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
17+
font-size: 1.05rem;
18+
line-height: 1.78;
19+
color: var(--fg);
20+
background: var(--bg);
21+
max-width: 50rem;
22+
margin: 0 auto;
23+
padding: 3rem 1.5rem 5rem;
24+
}
25+
26+
h1 {
27+
font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial,
28+
sans-serif;
29+
font-size: 1.75rem;
30+
font-weight: 800;
31+
color: var(--heading);
32+
margin: 0 0 1.5rem;
33+
padding-bottom: 0.75rem;
34+
border-bottom: 3px solid var(--accent);
35+
}
36+
37+
a {
38+
color: var(--accent);
39+
}
40+
</style>
41+
</head>
42+
<body>
43+
<main>
44+
<h1>Page not found</h1>
45+
<p>
46+
The page you're looking for doesn't exist. Return to
47+
<a href="{{ "/" | relURL }}">{{ .Site.Title }}</a>.
48+
</p>
49+
</main>
50+
</body>
51+
</html>

0 commit comments

Comments
 (0)