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
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "md-blog", "name": "md-blog",
"version": "1.6.0", "version": "1.7.0",
"private": true, "private": true,
"type": "module", "type": "module",
"repository": "https://github.com/klemek/md-blog", "repository": "https://github.com/klemek/md-blog",
+10 -5
View File
@@ -2,17 +2,22 @@
import { TITLE } from '@lib/config' import { TITLE } from '@lib/config'
import { stripHTML } from '@lib/strings' import { stripHTML } from '@lib/strings'
import PageFooter from '@components/PageFooter.vue' import PageFooter from '@components/PageFooter.vue'
import { onBeforeMount } from 'vue' import { onBeforeMount, ref } from 'vue'
import NavBar from '@components/NavBar.vue'
onBeforeMount(() => { const html = ref<string>('')
window.document.title = stripHTML(TITLE) + ' — Not Found'
onBeforeMount(async () => {
window.document.title = stripHTML(TITLE)
html.value = (await import('@articles/not_found.md')).html
}) })
</script> </script>
<template> <template>
<main> <main class="article">
<NavBar /> <NavBar />
<h1>Page not found</h1> <div v-html="html"></div>
<PageFooter /> <PageFooter />
</main> </main>
</template> </template>