Skip to content

Commit

Permalink
feat: add plugin-markdown-include (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope authored Oct 24, 2024
1 parent 62b4599 commit c9534f2
Show file tree
Hide file tree
Showing 16 changed files with 902 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { docsearchPlugin } from '@vuepress/plugin-docsearch'
import { feedPlugin } from '@vuepress/plugin-feed'
import { markdownExtPlugin } from '@vuepress/plugin-markdown-ext'
import { markdownImagePlugin } from '@vuepress/plugin-markdown-image'
import { markdownIncludePlugin } from '@vuepress/plugin-markdown-include'
import { markdownMathPlugin } from '@vuepress/plugin-markdown-math'
import { markdownStylizePlugin } from '@vuepress/plugin-markdown-stylize'
import { redirectPlugin } from '@vuepress/plugin-redirect'
Expand Down Expand Up @@ -98,6 +99,9 @@ export default defineUserConfig({
mark: true,
size: true,
}),
markdownIncludePlugin({
deep: true,
}),
markdownMathPlugin({
type: 'katex',
}),
Expand Down Expand Up @@ -167,4 +171,6 @@ export default defineUserConfig({
: [],
cachePlugin(),
],

pagePatterns: ['**/*.md', '!**/*.snippet.md', '!.vuepress', '!node_modules'],
})
1 change: 1 addition & 0 deletions docs/.vuepress/configs/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const sidebarEn: SidebarOptions = {
'markdown-container',
'markdown-ext',
'markdown-image',
'markdown-include',
'markdown-hint',
'markdown-math',
'markdown-stylize',
Expand Down
1 change: 1 addition & 0 deletions docs/.vuepress/configs/sidebar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const sidebarZh: SidebarOptions = {
'markdown-container',
'markdown-ext',
'markdown-image',
'markdown-include',
'markdown-hint',
'markdown-math',
'markdown-stylize',
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@vuepress/plugin-feed": "workspace:*",
"@vuepress/plugin-markdown-ext": "workspace:*",
"@vuepress/plugin-markdown-image": "workspace:*",
"@vuepress/plugin-markdown-include": "workspace:*",
"@vuepress/plugin-markdown-math": "workspace:*",
"@vuepress/plugin-markdown-stylize": "workspace:*",
"@vuepress/plugin-markdown-tab": "workspace:*",
Expand Down
13 changes: 13 additions & 0 deletions docs/plugins/markdown/demo.snippet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Heading 2

<!-- #region snippet -->

Contents containing **bolded text** and some markdown enhance features:

<!-- #endregion snippet -->

::: tip

Hey how are **you**? :smile:

:::
Loading

0 comments on commit c9534f2

Please sign in to comment.