config.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. themeConfig: {
  17. sidebarDepth: 3, // e'b将同时提取markdown中h2 和 h3 标题,显示在侧边栏上。
  18. repoLabel: '查看源码',
  19. lastUpdated: 'Last Updated', // 文档更新时间:每个文件git最后提交的时间
  20. nav: [
  21. // { text: '前端算法', link: '/algorithm/' }, // 内部链接 以docs为根目录
  22. {
  23. text: '前端',
  24. items: [
  25. {
  26. text: 'CSS',
  27. link: '/CSS/',
  28. },
  29. {
  30. text: 'flutter',
  31. link: '/FLUTTER/',
  32. },
  33. {
  34. text: 'GIT',
  35. link: '/GIT/',
  36. },
  37. {
  38. text: 'JavaScript',
  39. link: '/JavaScript/',
  40. },
  41. {
  42. text: 'react',
  43. link: '/REACT/',
  44. },
  45. {
  46. text: 'vue',
  47. link: '/VUE/',
  48. },
  49. ],
  50. },
  51. {
  52. text: '后台',
  53. items: [
  54. {
  55. text: 'node',
  56. link: '/NODE/',
  57. },
  58. {
  59. text: 'ubuntu',
  60. link: '/UBUNTU/',
  61. },
  62. ],
  63. }, // 外部链接
  64. {
  65. text: '其他',
  66. items: [
  67. {
  68. text: 'IDE',
  69. link: '/IDE/',
  70. },
  71. {
  72. text: '待了解',
  73. link: '/About/WHY.md',
  74. },
  75. {
  76. text: '面试',
  77. link: '/INTERVIEW/',
  78. },
  79. ],
  80. },
  81. // 下拉列表
  82. {
  83. text: 'GitHub',
  84. link: 'https://github.com/Johnhong9527',
  85. // items: [
  86. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  87. // /* {
  88. // text: '算法仓库',
  89. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  90. // } */
  91. // ]
  92. },
  93. ],
  94. sidebar: {
  95. '/CSS/': [
  96. '',
  97. 'cases',
  98. '2018_10_21_01',
  99. '2018_10_21_02',
  100. '2018_10_21_03',
  101. '2018_10_21_04',
  102. '2018_10_21_05',
  103. 'principle',
  104. ],
  105. '/FLUTTER/': ['', '2018_10_25_01'],
  106. '/GIT/': ['', '2018_10_22_01', '2018_10_22_02', '2018_10_31_01'],
  107. '/IDE/': ['', '2018_10_28_01'],
  108. '/INTERVIEW/': ['', 'BasicAjax', 'HTTP', 'Terminology'],
  109. '/JavaScript/': [
  110. '',
  111. // 'one',
  112. '2018_10_29_02',
  113. '2018_10_28_01',
  114. '2018_11_02_01',
  115. '2018_11_02_02',
  116. '2018_11_02_03',
  117. '2018_11_02_04',
  118. '2018_11_02_05',
  119. ],
  120. '/NODE/': ['', '01_nodejs_phantomjs_nodemailer', '2018_10_28_01'],
  121. '/REACT/': ['', '2018_11_02_01'],
  122. '/UBUNTU/': ['', '2018_10_28_01', '2018_10_28_02', '2018_10_28_03'],
  123. '/VUE/': [
  124. '',
  125. '2018_10_31_01',
  126. '2018_10_31_02',
  127. '2018_11_02_01',
  128. '2018_11_02_02',
  129. '2018_11_02_03',
  130. '2018_11_02_04',
  131. ],
  132. },
  133. },
  134. configureWebpack: {
  135. resolve: {
  136. alias: {
  137. '@js': '/docs/.vuepress/components/js',
  138. '@alias': 'path/to/some/dir',
  139. },
  140. },
  141. },
  142. markdown: {
  143. module: {
  144. rules: [
  145. {
  146. test: /\.less$/,
  147. loader: 'less-loader', // compiles Less to CSS
  148. },
  149. ],
  150. },
  151. lineNumbers: true,
  152. // markdown-it-anchor 的选项
  153. // anchor: { permalink: false },
  154. // markdown-it-toc 的选项
  155. // toc: { includeLevel: [1, 2] },
  156. // config: md => {
  157. // // 使用更多的 markdown-it 插件!
  158. // md.use(require('markdown-it-xxx'))
  159. // }
  160. },
  161. };