From a5b24dc9bf847f127da13d6b3365af7a6f4ea182 Mon Sep 17 00:00:00 2001 From: klemek Date: Sun, 26 Apr 2026 22:10:44 +0200 Subject: [PATCH] feat: custom not found page --- package.json | 2 +- src/views/NotFoundView.vue | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 325f939..3865ab2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "md-blog", - "version": "1.6.0", + "version": "1.7.0", "private": true, "type": "module", "repository": "https://github.com/klemek/md-blog", diff --git a/src/views/NotFoundView.vue b/src/views/NotFoundView.vue index b4a3ef5..35c983c 100644 --- a/src/views/NotFoundView.vue +++ b/src/views/NotFoundView.vue @@ -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('') + +onBeforeMount(async () => { + window.document.title = stripHTML(TITLE) + + html.value = (await import('@articles/not_found.md')).html })