fix(404): Simplify path retrieval logic
This commit is contained in:
parent
5a2abc1d11
commit
b110b04273
1 changed files with 2 additions and 3 deletions
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
|
||||
const url = new URL(Astro.url);
|
||||
const notFoundPath = url.pathname
|
||||
const url = Astro.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>
|
||||
<p class="typewriter">sh: <span class="path">~{url}</span>: command not found.</p>
|
||||
|
||||
<div style="margin-top: 2rem;">
|
||||
<span class="command">help</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue