Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { DefaultTheme } from 'vitepress'
import { withPwa } from '@vite-pwa/vitepress'
import { defineConfig } from 'vitepress'
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'
import llmsVitePlugin, { copyOrDownloadAsMarkdownButtons } from 'vitepress-plugin-llms'
import { version } from '../package.json'
import { pwa } from './scripts/pwa'
import { transformHead } from './scripts/transformHead'
Expand Down Expand Up @@ -345,6 +346,7 @@ export default withPwa(defineConfig({
},
config(md) {
md.use(groupIconMdPlugin)
md.use(copyOrDownloadAsMarkdownButtons)
},
},
locales: {
Expand Down Expand Up @@ -485,7 +487,12 @@ export default withPwa(defineConfig({
},
vite: {
logLevel: 'info',
plugins: [groupIconVitePlugin()],
plugins: [
groupIconVitePlugin(),
llmsVitePlugin({
title: 'Vite PWA Plugin Documentation',
}),
],
},
pwa,
transformHead,
Expand Down
4 changes: 4 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Theme } from 'vitepress'
import CopyOrDownloadAsMarkdownButtons from 'vitepress-plugin-llms/vitepress-components/CopyOrDownloadAsMarkdownButtons.vue'
import DefaultTheme from 'vitepress/theme'
import { h } from 'vue'
import PwaLayout from './PwaLayout.vue'
Expand All @@ -14,4 +15,7 @@ export default {
Layout() {
return h(PwaLayout)
},
enhanceApp({ app }) {
app.component('CopyOrDownloadAsMarkdownButtons', CopyOrDownloadAsMarkdownButtons)
},
} satisfies Theme
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"vite-plugin-pwa": "^1.2.0",
"vitepress": "2.0.0-alpha.12",
"vitepress-plugin-group-icons": "^1.6.5",
"vitepress-plugin-llms": "^1.10.0",
"workbox-window": "^7.4.0"
},
"pnpm": {
Expand Down
Loading