feat: custom not found page

This commit is contained in:
2026-04-26 22:10:44 +02:00
parent 99867aa03e
commit a5b24dc9bf
2 changed files with 11 additions and 6 deletions
+10 -5
View File
@@ -2,17 +2,22 @@
import { TITLE } from '@lib/config'
import { stripHTML } from '@lib/strings'
import PageFooter from '@components/PageFooter.vue'
import { onBeforeMount } from 'vue'
import { onBeforeMount, ref } from 'vue'
import NavBar from '@components/NavBar.vue'
onBeforeMount(() => {
window.document.title = stripHTML(TITLE) + ' — Not Found'
const html = ref<string>('')
onBeforeMount(async () => {
window.document.title = stripHTML(TITLE)
html.value = (await import('@articles/not_found.md')).html
})
</script>
<template>
<main>
<main class="article">
<NavBar />
<h1>Page not found</h1>
<div v-html="html"></div>
<PageFooter />
</main>
</template>