config.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. text: '你好',
  81. link: '/hello/',
  82. },*/
  83. ]
  84. },
  85. // 下拉列表
  86. {
  87. text: 'GitHub',
  88. link: 'https://github.com/Johnhong9527'
  89. // items: [
  90. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  91. // /* {
  92. // text: '算法仓库',
  93. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  94. // } */
  95. // ]
  96. }
  97. ],
  98. sidebar: {
  99. '/CSS/': [
  100. '',
  101. 'cases',
  102. '2018_10_21_01',
  103. '2018_10_21_02',
  104. '2018_10_21_03',
  105. '2018_10_21_04',
  106. '2018_10_21_05',
  107. 'principle',
  108. '2019_04_11_01'
  109. ],
  110. '/FLUTTER/': ['', '2018_10_25_01'],
  111. '/GIT/': ['', '2018_10_22_01', '2018_10_22_02', '2018_10_31_01'],
  112. '/IDE/': ['', '2018_10_28_01'],
  113. '/INTERVIEW/': ['', 'BasicAjax', 'HTTP', 'Terminology'],
  114. '/JavaScript/': [
  115. '',
  116. // '01',
  117. '2018_10_29_02',
  118. '2018_10_28_01',
  119. '2018_11_02_01',
  120. '2018_11_02_02',
  121. '2018_11_02_03',
  122. '2018_11_02_04',
  123. '2018_11_02_05',
  124. '2019_07_16_01'
  125. ],
  126. '/NODE/': ['', '01_nodejs_phantomjs_nodemailer', '2018_10_28_01'],
  127. '/REACT/': ['', '2018_11_02_01'],
  128. '/UBUNTU/': ['', '2018_10_28_01', '2018_10_28_02', '2018_10_28_03', '2019_01_11'],
  129. '/VUE/': [
  130. '',
  131. '2018_10_31_01',
  132. '2018_10_31_02',
  133. '2018_11_02_01',
  134. '2018_11_02_02',
  135. '2018_11_02_03',
  136. '2018_11_02_04'
  137. ]
  138. },
  139. algolia: {
  140. apiKey: 'f155116ae3f199b1d79b55adf623b6d8',
  141. indexName: 'honghaitao'
  142. }
  143. },
  144. configureWebpack: {
  145. resolve: {
  146. alias: {
  147. '@js': '/docs/.vuepress/components/js',
  148. '@alias': 'path/to/some/dir'
  149. }
  150. }
  151. },
  152. markdown: {
  153. module: {
  154. rules: [
  155. {
  156. test: /\.less$/,
  157. loader: 'less-loader' // compiles Less to CSS
  158. }
  159. ]
  160. },
  161. lineNumbers: true
  162. // markdown-it-anchor 的选项
  163. // anchor: { permalink: false },
  164. // markdown-it-toc 的选项
  165. // toc: { includeLevel: [1, 2] },
  166. // config: md => {
  167. // // 使用更多的 markdown-it 插件!
  168. // md.use(require('markdown-it-xxx'))
  169. // }
  170. }
  171. };