diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 7464cfa..46bf945 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -6,6 +6,10 @@ import { GitChangelogMarkdownSection, } from '@nolebase/vitepress-plugin-git-changelog/vite'; +import { + InlineLinkPreviewElementTransform +} from '@nolebase/vitepress-plugin-inline-link-preview/markdown-it'; + export const customIcons = { share: { svg: '' @@ -20,20 +24,36 @@ export default defineConfig({ base: baseUrl, ignoreDeadLinks: true, - markdown: { - config: (md) => { - md.use(lightbox, {}); - } + sitemap: { + hostname: 'https://kirigaya.cn/' + baseUrl }, vite: { plugins: [ GitChangelog({ - // Fill in your repository URL here + // 填写在此处填写您的仓库链接 repoURL: () => 'https://gitea.3geeks.top/kirigaya/openmcp-document', }), GitChangelogMarkdownSection(), ], + optimizeDeps: { + exclude: [ + '@nolebase/vitepress-plugin-inline-link-preview/client', + ], + }, + ssr: { + noExternal: [ + // 如果还有别的依赖需要添加的话,并排填写和配置到这里即可 // + '@nolebase/vitepress-plugin-inline-link-preview', + ], + }, + }, + + markdown: { + config: (md) => { + md.use(lightbox); + md.use(InlineLinkPreviewElementTransform); + } }, head: [ diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue index f38cfcd..1256cd5 100644 --- a/.vitepress/theme/Layout.vue +++ b/.vitepress/theme/Layout.vue @@ -1,7 +1,9 @@