config.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. module.exports = {
  2. title: '看白鹿的博客',
  3. description: '只有敢于尝试,才能品味人生.',
  4. // base: '/myBlogs/',
  5. dest: 'dist',
  6. head: [
  7. // ['link', { rel: 'icon', href: '/favicon.ico' }], // 增加一个自定义的 favicon(网页标签的图标)
  8. [
  9. 'link',
  10. {
  11. rel: 'icon',
  12. href: '/logo.png',
  13. },
  14. ], // 增加一个自定义的 favicon(网页标签的图标)
  15. ],
  16. plugins: [
  17. /*[
  18. 'vuepress-plugin-comment',
  19. {
  20. choosen: 'valine',
  21. // options选项中的所有参数,会传给Valine的配置
  22. options: {
  23. el: '#valine-vuepress-comment',
  24. appId: 'O2bEd2bFE0R0IEE35j9sHGhd-gzGzoHsz',
  25. appKey: 'fF4QkBG5GPghnvV7nqclEqty',
  26. notify: false,
  27. verify: false,
  28. visitor: true,
  29. path: '<%- frontmatter.commentid || frontmatter.permalink %>',
  30. avatar: 'vBPlRNwUOJlHqfmoSAmXz5Qk',
  31. placeholder: '欢迎留言与我分享您的想法...',
  32. }
  33. }
  34. ]*/
  35. ],
  36. themeConfig: {
  37. sidebarDepth: 3, // e'b将同时提取markdown中h2 和 h3 标题,显示在侧边栏上。
  38. repoLabel: '查看源码',
  39. lastUpdated: 'Last Updated', // 文档更新时间:每个文件git最后提交的时间
  40. nav: [
  41. // { text: '前端算法', link: '/algorithm/' }, // 内部链接 以docs为根目录
  42. {
  43. text: '前端',
  44. items: [
  45. {
  46. text: 'CSS',
  47. link: '/CSS/',
  48. },
  49. {
  50. text: 'flutter',
  51. link: '/FLUTTER/',
  52. },
  53. {
  54. text: 'GIT',
  55. link: '/GIT/',
  56. },
  57. {
  58. text: 'JavaScript',
  59. link: '/JavaScript/',
  60. },
  61. {
  62. text: 'react',
  63. link: '/REACT/',
  64. },
  65. {
  66. text: 'vue',
  67. link: '/VUE/',
  68. },
  69. ],
  70. },
  71. {
  72. text: '后台',
  73. items: [
  74. {
  75. text: 'node',
  76. link: '/NODE/',
  77. },
  78. {
  79. text: 'ubuntu',
  80. link: '/UBUNTU/',
  81. },
  82. ],
  83. }, // 外部链接
  84. {
  85. text: '其他',
  86. items: [
  87. {
  88. text: 'IDE',
  89. link: '/IDE/',
  90. },
  91. {
  92. text: '待了解',
  93. link: '/About/WHY.md',
  94. },
  95. {
  96. text: '面试',
  97. link: '/INTERVIEW/',
  98. },
  99. {
  100. text: '你好',
  101. link: '/hello/',
  102. },
  103. ],
  104. },
  105. // 下拉列表
  106. {
  107. text: 'GitHub',
  108. link: 'https://github.com/Johnhong9527',
  109. // items: [
  110. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  111. // /* {
  112. // text: '算法仓库',
  113. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  114. // } */
  115. // ]
  116. },
  117. ],
  118. sidebar: {
  119. '/CSS/': [
  120. '',
  121. 'cases',
  122. '2018_10_21_01',
  123. '2018_10_21_02',
  124. '2018_10_21_03',
  125. '2018_10_21_04',
  126. '2018_10_21_05',
  127. 'principle',
  128. '2019_04_11_01'
  129. ],
  130. '/FLUTTER/': ['', '2018_10_25_01'],
  131. '/GIT/': ['', '2018_10_22_01', '2018_10_22_02', '2018_10_31_01'],
  132. '/IDE/': ['', '2018_10_28_01'],
  133. '/INTERVIEW/': ['', 'BasicAjax', 'HTTP', 'Terminology'],
  134. '/JavaScript/': [
  135. '',
  136. // '01',
  137. '2018_10_29_02',
  138. '2018_10_28_01',
  139. '2018_11_02_01',
  140. '2018_11_02_02',
  141. '2018_11_02_03',
  142. '2018_11_02_04',
  143. '2018_11_02_05',
  144. ],
  145. '/NODE/': ['', '01_nodejs_phantomjs_nodemailer', '2018_10_28_01'],
  146. '/REACT/': ['', '2018_11_02_01'],
  147. '/UBUNTU/': ['', '2018_10_28_01', '2018_10_28_02', '2018_10_28_03', '2019_01_11'],
  148. '/VUE/': [
  149. '',
  150. '2018_10_31_01',
  151. '2018_10_31_02',
  152. '2018_11_02_01',
  153. '2018_11_02_02',
  154. '2018_11_02_03',
  155. '2018_11_02_04',
  156. ],
  157. },
  158. algolia: {
  159. apiKey: 'f155116ae3f199b1d79b55adf623b6d8',
  160. indexName: 'honghaitao',
  161. },
  162. },
  163. configureWebpack: {
  164. resolve: {
  165. alias: {
  166. '@js': '/docs/.vuepress/components/js',
  167. '@alias': 'path/to/some/dir',
  168. },
  169. },
  170. },
  171. markdown: {
  172. module: {
  173. rules: [
  174. {
  175. test: /\.less$/,
  176. loader: 'less-loader', // compiles Less to CSS
  177. },
  178. ],
  179. },
  180. lineNumbers: true,
  181. // markdown-it-anchor 的选项
  182. // anchor: { permalink: false },
  183. // markdown-it-toc 的选项
  184. // toc: { includeLevel: [1, 2] },
  185. // config: md => {
  186. // // 使用更多的 markdown-it 插件!
  187. // md.use(require('markdown-it-xxx'))
  188. // }
  189. },
  190. };