添加 404 页

This commit is contained in:
2026-04-09 13:34:09 +08:00
parent 6c525bcf98
commit ee3585586d
3 changed files with 25 additions and 0 deletions

10
src/pages/404.astro Normal file
View File

@ -0,0 +1,10 @@
---
import BoringLayout from '../layout/BoringLayout.astro'
---
<BoringLayout title="404 - 小帕的小窝">
<h1>网页走丢了!!</h1>
<p>不知道为什么就到了这里。。</p>
<p><a href="javascript:history.back()">点击这里</a>回到上一页</p>
<p>或者<a href="/">点击这里</a>回到主页</p>
</BoringLayout>

10
src/pages/500.astro Normal file
View File

@ -0,0 +1,10 @@
---
import BoringLayout from '../layout/BoringLayout.astro'
---
<BoringLayout title="500 - 小帕的小窝">
<h1>服务器内部错误</h1>
<p>哦不肯定是小帕搞错了什么东西。。</p>
<p><a href="javascript:history.back()">点击这里</a>回到上一页</p>
<p>或者<a href="/">点击这里</a>回到主页</p>
</BoringLayout>

View File

@ -0,0 +1,5 @@
---
export const prerender = false
return Astro.redirect('/404')
---