Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
micaiguai committed Jul 20, 2024
1 parent 40dc71e commit 8494b23
Show file tree
Hide file tree
Showing 6 changed files with 694 additions and 3 deletions.
8 changes: 7 additions & 1 deletion packages/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* eslint-disable regexp/no-useless-escape */
/* eslint-disable regexp/no-misleading-capturing-group */
/* eslint-disable regexp/optimal-quantifier-concatenation */

/* eslint-disable regexp/no-unused-capturing-group */

import { readdir } from 'node:fs/promises'
import { join, resolve } from 'node:path'
import { cwd, env } from 'node:process'
import { defineConfig } from 'vitepress'
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { genIndexMd } from './utils/genIndexMd'
import type { File, Folder } from './types'

Expand Down Expand Up @@ -145,4 +146,9 @@ export default defineConfig({
{ icon: 'github', link: 'https://github.com/micaiguai' },
],
},
markdown: {
codeTransformers: [
transformerTwoslash(),
],
},
})
12 changes: 12 additions & 0 deletions packages/docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// .vitepress/theme/index.ts
import Theme from 'vitepress/theme'
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import '@shikijs/vitepress-twoslash/style.css'
import type { EnhanceAppContext } from 'vitepress'

export default {
extends: Theme,
enhanceApp({ app }: EnhanceAppContext) {
app.use(TwoslashFloatingVue)
},
}
2 changes: 2 additions & 0 deletions packages/docs/notes/30000_shortcut/100_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
## macos
- `⌘ + F3`: 展示桌面
- `⌃ + ⌘ + Q`: 锁屏
- `fn + ⌃ + F3`: dock show/hide
- `⌘ + ⌃ + space`: symbol panel
1 change: 1 addition & 0 deletions packages/docs/notes/300_vue2/100_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
- v-model:双向数据绑定
### Vue vs JQuery
- 操作DOM:Vue可以不用关注,JQuery需要频繁操作
```
1 change: 1 addition & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"vue": "^3.4.29"
},
"devDependencies": {
"@shikijs/vitepress-twoslash": "^1.10.3",
"chokidar": "^3.6.0",
"deep-object-diff": "^1.1.9",
"nodemon": "^3.1.0",
Expand Down
Loading

0 comments on commit 8494b23

Please sign in to comment.