Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdapl committed Dec 21, 2024
2 parents 515b836 + 7230dd9 commit c9f5a1f
Show file tree
Hide file tree
Showing 5 changed files with 459 additions and 546 deletions.
2 changes: 1 addition & 1 deletion packages/vuepress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@vuepress/plugin-markdown-image": "2.0.0-rc.30",
"@vuepress/plugin-markdown-tab": "2.0.0-rc.47",
"@vuepress/plugin-redirect": "2.0.0-rc.8",
"@vuepress/plugin-slimsearch": "2.0.0-rc.61",
"dashjs": "^4.7.4",
"hls.js": "^1.5.13",
"mermaid": "^10.9.1 || ^11.0.0",
Expand All @@ -54,7 +55,6 @@
"vidstack": "^1.11.30",
"vue": "^3.5.8",
"vuepress": "2.0.0-rc.19",
"vuepress-plugin-search-pro": "2.0.0-rc.59",
"vuepress-theme-hope": "2.0.0-rc.66"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vuepress/src/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './bundler'
export * from './constant'
export * from './headers'
export * from './i18n'
export * from './constant'
export * from './theme-plugins'
export * from './theme'
export * from './theme-plugins'
78 changes: 1 addition & 77 deletions packages/vuepress/src/core/theme-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,45 +55,6 @@ export const baseThemePluginOptions = {
// // 启用图片大小
// size: true,
// }),
// 代码块
mdEnhance: {
// 支持任务列表
tasklist: true,
playground: {
presets: ['ts', 'vue'],
},
// revealjs: [
// 'highlight',
// 'math',
// 'search',
// 'notes',
// 'zoom',
// ],
// stylize: [
// {
// matcher: 'Recommended',
// replacer: ({ tag }) => {
// if (tag === 'em') {
// return {
// tag: 'Badge',
// attrs: { type: 'tip' },
// content: 'Recommended',
// }
// }
// },
// },
// ],
sub: true,
sup: true,
vPre: true,
vuePlayground: true,
// 文件导入配置别名
include: true,
// mermaid
mermaid: true,
// 自定义对齐
align: true,
},
copyCode: {
showInMobile: true,
},
Expand All @@ -112,48 +73,11 @@ export const baseThemePluginOptions = {
'XiGua',
],
},
searchPro: {
slimsearch: {
// 参考:https://plugin-search-pro.vuejs.press/zh/config.html#locales
locales: {
'/': searchProCNLocals,
},
},
// 参考:https://theme-hope.vuejs.press/zh/config/plugins/others.html#markdowntab
markdownTab: true,
nprogress: true,
// 代码高亮:https://theme-hope.vuejs.press/zh/guide/feature/code-block.html
shiki: {
// 参考:https://shiki.tmrs.site/languages
langs: [
'ts',
'js',
'vue',
'json',
'json5',
'jsonc',
'jsx',
'lua',
'shellscript',
'diff',
'c',
'c++',
'dockerfile',
'nginx',
'proto',
'java',
'javascript',
'typescript',
'yaml',
'text',
'graphql',
'http',
'python',
'xml',
],
// 你想要使用的主题
themes: {
light: 'one-light',
dark: 'one-dark-pro',
},
},
}
50 changes: 48 additions & 2 deletions packages/vuepress/src/core/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,54 @@ const baseThemeConfig = {
// version: '',
// }),
// copyright: getCopyRightText(''),
plugins: {
...baseThemePluginOptions,
plugins: baseThemePluginOptions,
markdown: {
// 支持任务列表
tasklist: true,
playground: {
presets: ['ts', 'vue'],
},
sub: true,
sup: true,
vPre: true,
vuePlayground: true,
// 文件导入配置别名
include: true,
// mermaid
mermaid: true,
// 自定义对齐
align: true,
tabs: true,
codeTabs: true,
highlighter: {
// 参考:https://shiki.tmrs.site/languages
langs: [
'ts',
'js',
'vue',
'json',
'json5',
'jsonc',
'jsx',
'lua',
'shellscript',
'diff',
'c',
'c++',
'dockerfile',
'nginx',
'proto',
'java',
'javascript',
'typescript',
'yaml',
'text',
'graphql',
'http',
'python',
'xml',
],
},
},
}

Expand Down
Loading

0 comments on commit c9f5a1f

Please sign in to comment.