config.ts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /**
  2. * 查看以下文档了解主题配置
  3. * - @see https://theme-plume.vuejs.press/config/intro/ 配置说明
  4. * - @see https://theme-plume.vuejs.press/config/theme/ 主题配置项
  5. *
  6. * 请注意,对此文件的修改都会重启 vuepress 服务。
  7. * 部分配置项的更新没有必要重启 vuepress 服务,建议请在 `.vuepress/config.ts` 文件中配置
  8. *
  9. * 特别的,请不要在两个配置文件中重复配置相同的项,当前文件的配置项会被覆盖
  10. */
  11. import { viteBundler } from '@vuepress/bundler-vite'
  12. import { defineUserConfig } from 'vuepress'
  13. import { plumeTheme } from 'vuepress-theme-plume'
  14. export default defineUserConfig({
  15. base: '/',
  16. lang: 'zh-CN',
  17. title: '文档中心',
  18. description: '华菁振兴',
  19. head: [
  20. // 配置站点图标
  21. ['link', { rel: 'icon', type: 'image/png', href: './logo.png' }],
  22. ],
  23. bundler: viteBundler(),
  24. shouldPrefetch: false, // 站点较大,页面数量较多时,不建议启用
  25. theme: plumeTheme({
  26. /* 添加您的部署域名, 有助于 SEO, 生成 sitemap */
  27. // hostname: 'https://your_site_url',
  28. /* 文档仓库配置,用于 editLink */
  29. // docsRepo: '',
  30. // docsDir: 'docs',
  31. // docsBranch: '',
  32. /* 页内信息 */
  33. // editLink: true,
  34. // lastUpdated: true,
  35. // contributors: true,
  36. // changelog: false,
  37. /**
  38. * 编译缓存,加快编译速度
  39. * @see https://theme-plume.vuejs.press/config/basic/#cache
  40. */
  41. cache: 'filesystem',
  42. /**
  43. * 为 markdown 文件自动添加 frontmatter 配置
  44. * @see https://theme-plume.vuejs.press/config/basic/#autofrontmatter
  45. */
  46. // autoFrontmatter: {
  47. // permalink: true, // 是否生成永久链接
  48. // createTime: true, // 是否生成创建时间
  49. // title: true, // 是否生成标题
  50. // },
  51. /* 本地搜索, 默认启用 */
  52. search: { provider: 'local' },
  53. /**
  54. * Algolia DocSearch
  55. * 启用此搜索需要将 本地搜索 search 设置为 false
  56. * @see https://theme-plume.vuejs.press/config/plugins/search/#algolia-docsearch
  57. */
  58. // search: {
  59. // provider: 'algolia',
  60. // appId: '',
  61. // apiKey: '',
  62. // indices: [''],
  63. // },
  64. /**
  65. * Shiki 代码高亮
  66. * @see https://theme-plume.vuejs.press/config/plugins/code-highlight/
  67. */
  68. // codeHighlighter: {
  69. // twoslash: true, // 启用 twoslash
  70. // whitespace: true, // 启用 空格/Tab 高亮
  71. // lineNumbers: true, // 启用行号
  72. // },
  73. /* 文章字数统计、阅读时间,设置为 false 则禁用 */
  74. // readingTime: true,
  75. /**
  76. * markdown
  77. * @see https://theme-plume.vuejs.press/config/markdown/
  78. */
  79. markdown:{
  80. fileTree: true, // :::file-tree 文件树容器
  81. plot: true, // !!plot!! 隐秘文本
  82. icons: true, // ::collect:name:: 内联 iconify 图标
  83. pdf: true
  84. }
  85. // markdown: {
  86. // abbr: true, // 启用 abbr 语法 *[label]: content
  87. // annotation: true, // 启用 annotation 语法 [+label]: content
  88. // pdf: true, // 启用 PDF 嵌入 @[pdf](/xxx.pdf)
  89. // caniuse: true, // 启用 caniuse 语法 @[caniuse](feature_name)
  90. // plot: true, // 启用隐秘文本语法 !!xxxx!!
  91. // bilibili: true, // 启用嵌入 bilibili视频 语法 @[bilibili](bid)
  92. // youtube: true, // 启用嵌入 youtube视频 语法 @[youtube](video_id)
  93. // artPlayer: true, // 启用嵌入 artPlayer 本地视频 语法 @[artPlayer](url)
  94. // audioReader: true, // 启用嵌入音频朗读功能 语法 @[audioReader](url)
  95. // icon: { provider: 'iconify' }, // 启用内置图标语法 ::icon-name::
  96. // table: true, // 启用表格增强容器语法 ::: table
  97. // codepen: true, // 启用嵌入 codepen 语法 @[codepen](user/slash)
  98. // replit: true, // 启用嵌入 replit 语法 @[replit](user/repl-name)
  99. // codeSandbox: true, // 启用嵌入 codeSandbox 语法 @[codeSandbox](id)
  100. // jsfiddle: true, // 启用嵌入 jsfiddle 语法 @[jsfiddle](user/id)
  101. // npmTo: true, // 启用 npm-to 容器 ::: npm-to
  102. // demo: true, // 启用 demo 容器 ::: demo
  103. // repl: { // 启用 代码演示容器
  104. // go: true, // ::: go-repl
  105. // rust: true, // ::: rust-repl
  106. // kotlin: true, // ::: kotlin-repl
  107. // python: true, // ::: python-repl
  108. // },
  109. // math: { // 启用数学公式
  110. // type: 'katex',
  111. // },
  112. // chartjs: true, // 启用 chart.js
  113. // echarts: true, // 启用 ECharts
  114. // mermaid: true, // 启用 mermaid
  115. // flowchart: true, // 启用 flowchart
  116. // image: {
  117. // figure: true, // 启用 figure
  118. // lazyload: true, // 启用图片懒加载
  119. // mark: true, // 启用图片标记
  120. // size: true, // 启用图片大小
  121. // },
  122. // include: true, // 在 Markdown 文件中导入其他 markdown 文件内容
  123. // imageSize: 'local', // 启用 自动填充 图片宽高属性,避免页面抖动
  124. // },
  125. /**
  126. * 水印
  127. * @see https://theme-plume.vuejs.press/guide/features/watermark/
  128. */
  129. // watermark: true,
  130. /**
  131. * 评论 comments
  132. * @see https://theme-plume.vuejs.press/guide/features/comments/
  133. */
  134. // comment: {
  135. // provider: '', // "Artalk" | "Giscus" | "Twikoo" | "Waline"
  136. // comment: true,
  137. // repo: '',
  138. // repoId: '',
  139. // category: '',
  140. // categoryId: '',
  141. // mapping: 'pathname',
  142. // reactionsEnabled: true,
  143. // inputPosition: 'top',
  144. // },
  145. /**
  146. * 资源链接替换
  147. * @see https://theme-plume.vuejs.press/guide/features/replace-assets/
  148. */
  149. // replaceAssets: 'https://cdn.example.com',
  150. /**
  151. * 加密功能
  152. * @see https://theme-plume.vuejs.press/guide/features/encryption/
  153. */
  154. // encrypt: {},
  155. }),
  156. })