feat: custom not found page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user