diff options
| author | 2023-04-19 17:30:39 +0800 | |
|---|---|---|
| committer | 2023-04-19 17:30:39 +0800 | |
| commit | 3adc965dd09490b7efa1cce9f09b0a3b30970277 (patch) | |
| tree | f813abb07d7b003984aa74e3154752b6ffc3ccd5 /docs/app/module.ts | |
| parent | c7c9ca6f0c8eddf6d34cd40779f3b2d9463f3a46 (diff) | |
| download | HydroRoll-3adc965dd09490b7efa1cce9f09b0a3b30970277.tar.gz HydroRoll-3adc965dd09490b7efa1cce9f09b0a3b30970277.zip | |
✨优化文档
Diffstat (limited to 'docs/app/module.ts')
| -rw-r--r-- | docs/app/module.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/app/module.ts b/docs/app/module.ts new file mode 100644 index 0000000..4e425a6 --- /dev/null +++ b/docs/app/module.ts @@ -0,0 +1,25 @@ +import { fileURLToPath } from 'url' +import { addPlugin, defineNuxtModule } from '@nuxt/kit' +import { resolve } from 'pathe' + +const themeDir = fileURLToPath(new URL('./', import.meta.url)) +const resolveThemeDir = (path: string) => resolve(themeDir, path) + +export default defineNuxtModule({ + meta: { + name: 'docus', + version: '3.0.0', + compatibility: { + nuxt: '^3.0.0-rc.14', + bridge: false + }, + configKey: 'docus' + }, + setup (_, nuxt) { + if (nuxt.options?.runtimeConfig?.public?.algolia?.docSearch) { + addPlugin({ + src: resolveThemeDir('integrations/docsearch.ts') + }) + } + } +}) |
