File tree Expand file tree Collapse file tree 4 files changed +197
-17
lines changed
Expand file tree Collapse file tree 4 files changed +197
-17
lines changed Original file line number Diff line number Diff line change 11import { defineConfig } from 'vitepress' ;
2- import { defaultHoverInfoProcessor , transformerTwoslash } from '@shikijs/vitepress-twoslash' ;
3- import { transformerRemoveNotationEscape , transformerNotationDiff } from '@shikijs/transformers' ;
2+ import llmstxt from 'vitepress-plugin-llms' ;
3+ import { copyOrDownloadAsMarkdownButtons } from 'vitepress-plugin-llms' ;
4+
45import { getLocaleConfig } from './locale' ;
56import { transformHead } from './transformHead' ;
67
@@ -12,6 +13,9 @@ export default defineConfig({
1213 locales : {
1314 root : getLocaleConfig ( 'en' ) ,
1415 } ,
16+ vite : {
17+ plugins : [ llmstxt ( ) ]
18+ } ,
1519 themeConfig : {
1620 search : {
1721 provider : 'local' ,
@@ -42,6 +46,11 @@ export default defineConfig({
4246 hostname : docsLink ,
4347 } ,
4448 transformHead,
49+ markdown : {
50+ config ( md ) {
51+ md . use ( copyOrDownloadAsMarkdownButtons ) ;
52+ }
53+ }
4554 // markdown: {
4655 // codeTransformers: [
4756 // {
Original file line number Diff line number Diff line change 1- import Theme from 'vitepress/theme'
1+ import type { EnhanceAppContext } from 'vitepress' ;
2+ import Theme from 'vitepress/theme' ;
3+
24// import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
3- import type { EnhanceAppContext } from 'vitepress'
4- import './style.css'
5+ import './style.css' ;
56// import '@nolebase/vitepress-plugin-git-changelog/client/style.css'
67// import '@shikijs/vitepress-twoslash/style.css'
7- import Contributors from '../components/Contributors.vue'
8- import Changelog from '../components/Changelog.vue'
9- import Layout from './Layout.vue'
10- import 'uno.css'
8+ import Layout from './Layout.vue' ;
9+ import Changelog from '../components/Changelog.vue' ;
10+ import Contributors from '../components/Contributors.vue' ;
11+
12+ import 'uno.css' ;
13+ import CopyOrDownloadAsMarkdownButtons from 'vitepress-plugin-llms/vitepress-components/CopyOrDownloadAsMarkdownButtons.vue' ;
1114
1215export default {
1316 ...Theme ,
1417 Layout,
1518 enhanceApp ( { app } : EnhanceAppContext ) {
16- app . component ( 'Contributors' , Contributors )
17- app . component ( 'Changelog' , Changelog )
19+ app . component ( 'Contributors' , Contributors ) ;
20+ app . component ( 'Changelog' , Changelog ) ;
21+ app . component ( 'CopyOrDownloadAsMarkdownButtons' , CopyOrDownloadAsMarkdownButtons ) ;
1822
1923 // app.use(TwoslashFloatingVue)
2024 } ,
21- }
25+ } ;
Original file line number Diff line number Diff line change 2121 "unocss" : " ^0.62.1" ,
2222 "vite" : " ^5.4.0" ,
2323 "vitepress" : " ^1.3.2" ,
24+ "vitepress-plugin-llms" : " ^1.10.0" ,
2425 "vue" : " ^3.4.37"
2526 }
2627}
You can’t perform that action at this time.
0 commit comments