Skip to content

Commit

Permalink
feat: ✨ add custom 404
Browse files Browse the repository at this point in the history
  • Loading branch information
collinbarrett committed Sep 2, 2023
1 parent 2f16d0d commit 6e4da56
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
30 changes: 30 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: null
title: 404 Not Found
---

<!DOCTYPE html>
<html lang="en-US">

<head>
{% include head-custom.html %}
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-family: Arial, sans-serif;
}
</style>
</head>

<body>
<h1>404: Page Not Found</h1>

<a href="{{ "/" | absolute_url }}">Collin M. Barrett Home</a>
<a href="{{ "/" | absolute_url }}"><img src="{{site.logo | relative_url}}" alt="Collin M. Barrett" /></a>
</body>

</html>
14 changes: 14 additions & 0 deletions _includes/head-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->

<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">
<link rel="manifest" href="/assets/img/favicon/site.webmanifest">
15 changes: 1 addition & 14 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,7 @@
<html lang="en-US">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->

<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">
<link rel="manifest" href="/assets/img/favicon/site.webmanifest">
{% include head-custom.html %}
</head>

<body>
Expand Down

0 comments on commit 6e4da56

Please sign in to comment.