Skip to content

Commit

Permalink
Add 404 error page
Browse files Browse the repository at this point in the history
  • Loading branch information
JCapucho committed Jul 20, 2023
1 parent e6da1b5 commit 9821172
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Link.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export interface Props {
const { href } = Astro.props;
---

<a href={href} class="border-b border-accent2 text-accent hover:bg-accent2/50">
<a href={href} class="link">
<slot />
</a>
17 changes: 17 additions & 0 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import Link from "@/components/Link.astro";
import Layout from "../layouts/Layout.astro";
---

<Layout title="404">
<article class="text-lg">
<h1 class="text-xl">404 - Page Not Found</h1>
<br />
<p>
This shouldn't happen, if a link in this site redirected to here please
contact me so that I can fix it.
</p>
<br />
<Link href="/">&lt;- Return to homepage</Link>
</article>
</Layout>

0 comments on commit 9821172

Please sign in to comment.