Skip to content

Commit 362f948

Browse files
authored
feat: add 404.html to static assets (#70)
1 parent 9927267 commit 362f948

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

assets/404.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
6+
<title>404 - Page Not Found</title>
7+
8+
<!-- Custom styles for this template -->
9+
<link href="/style.css" rel="stylesheet" />
10+
11+
<style>
12+
h1 {
13+
display: flex;
14+
justify-content: center;
15+
align-items: center;
16+
font-size: 3rem;
17+
}
18+
</style>
19+
20+
<script>
21+
if (location.pathname.match(/\/\d{4}\/\d{2}\/\d{2}\//)) {
22+
location.pathname = location.pathname.replace(
23+
/\/(\d{4})\/(\d{2})\/(\d{2})\//,
24+
"/$1-$2-$3-"
25+
);
26+
}
27+
</script>
28+
</head>
29+
30+
<body>
31+
<h1>404 - Page Not Found</h1>
32+
</body>
33+
</html>

zine.ziggy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Site {
55
.layouts_dir_path = "layouts",
66
.assets_dir_path = "assets",
77
.static_assets = [
8+
"404.html"
89
],
910
}

0 commit comments

Comments
 (0)