Skip to content

Commit 348fcfa

Browse files
2 parents d828cf5 + e24b8b7 commit 348fcfa

5 files changed

Lines changed: 2212 additions & 232 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ export default defineConfig({
3131
hostname: "https://wiki.tooldelta.top",
3232
},
3333

34-
themeConfig: {
35-
logo: { src: '/ico.svg', width: 24, height: 24 },
36-
search: {
37-
provider: "local",
38-
options: {
34+
themeConfig: {
35+
logo: { src: '/ico.svg', width: 24, height: 24 },
36+
notFound: {
37+
code: "404",
38+
title: "页面没有找到",
39+
quote: "这里还没有对应的文档。你可以返回首页,或从导航栏继续查找 ToolDelta 的使用与插件开发内容。",
40+
linkLabel: "返回 ToolDelta Wiki 首页",
41+
linkText: "返回首页",
42+
},
43+
search: {
44+
provider: "local",
45+
options: {
3946
_render(src, env, md) {
4047
const html = md.render(src, env);
4148
if (env.frontmatter?.search === false) {
@@ -278,4 +285,4 @@ export default defineConfig({
278285
detailsLabel: "详细信息",
279286
},
280287
},
281-
});
288+
});

docs/.vitepress/theme/Layout.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script setup lang="ts">
2+
import { useData } from 'vitepress'
3+
import DefaultTheme from 'vitepress/theme'
4+
import NotFound from './NotFound.vue'
5+
6+
const { Layout } = DefaultTheme
7+
const { page } = useData()
8+
</script>
9+
10+
<template>
11+
<Layout>
12+
<template #not-found>
13+
<NotFound v-if="page.isNotFound" />
14+
</template>
15+
</Layout>
16+
</template>

0 commit comments

Comments
 (0)