feat(pages): Add 404 page and homepage description

This commit is contained in:
conglinyizhi 2025-05-18 01:55:07 +08:00
parent b697dead84
commit b340559fb2
2 changed files with 27 additions and 2 deletions

26
src/pages/404.astro Normal file
View file

@ -0,0 +1,26 @@
---
import Layout from '../layouts/Layout.astro';
const url = new URL(Astro.url);
const notFoundPath = url.pathname
---
<Layout title="404 | Terminal Blog" description="Page not found">
<h1 class="title">command not found.</h1>
<div class="content">
<p class="typewriter">sh: <span class="path">~{notFoundPath}</span>: command not found.</p>
<div style="margin-top: 2rem;">
<span class="command">help</span>
<div style="margin-top: 1rem; margin-left: 1rem;">
<p>
Looks like this is an unknown command or file, try:
</p>
<p>
<a href="/">Return to Home</a>
</p>
</div>
</div>
</div>
</Layout>

View file

@ -3,9 +3,8 @@ import Layout from '../layouts/Layout.astro';
--- ---
<Layout title="Home | Terminal Blog"> <Layout title="Home | Terminal Blog" description="That a good start.">
<h1 class="title">~/</h1> <h1 class="title">~/</h1>
<div class="content"> <div class="content">
Not much here yet, but you can check out my blog posts <a href="/blog">here</a>. Not much here yet, but you can check out my blog posts <a href="/blog">here</a>.
<br /> <br />