Skip to content

Commit

Permalink
Add 404
Browse files Browse the repository at this point in the history
  • Loading branch information
Towerism committed May 25, 2024
1 parent 4cf65c7 commit 2fb4362
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
14 changes: 14 additions & 0 deletions components/AppPartial.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<ContentQuery :path="partial" find="one" v-slot="{ data }">
<ContentRenderer :value="data" />
</ContentQuery>
</template>

<script setup>
defineProps({
partial: {
type: String,
required: true,
},
});
</script>
10 changes: 10 additions & 0 deletions content/_404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Oops! You've wandered into the void. 🌌

It seems the page you're looking for has vanished into thin air.

But don't worry, my swarm of interdimensional nanobots is on the
case!

Meanwhile, why not explore the [homepage](/home){class="link"}?

[🚀]{class="text-3xl"}
6 changes: 5 additions & 1 deletion pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
class="flex flex-col justify-center max-w-2xl mx-auto bg-standard"
>
<div class="flex flex-col justify-center">
<ContentDoc />
<ContentDoc>
<template #not-found>
<AppPartial path="/_404" />
</template>
</ContentDoc>
</div>
</main>
</div>
Expand Down

0 comments on commit 2fb4362

Please sign in to comment.