Skip to content

Commit ce5f751

Browse files
authored
Merge pull request #2 from FullStackBulletin/four-oh-four
Added 404 page
2 parents db7aa57 + 7943313 commit ce5f751

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/build.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ const index = `<html>
3333
await writeFile(`${destPath}/index.html`, index)
3434
console.log(`Written ${destPath}/index.html`)
3535

36+
// Creates a 404.html file that says not found
37+
const fourOhFour = `<html>
38+
<head>
39+
<title>404 - Not Found</title>
40+
</head>
41+
<body>Not found</body>
42+
</html>`
43+
44+
await writeFile(`${destPath}/404.html`, fourOhFour)
45+
console.log(`Written ${destPath}/404.html`)
46+
3647
const stats = {
3748
total: quotes.length,
3849
all: `${baseUrl}/quotes/all.json`,

0 commit comments

Comments
 (0)