config.js 6.1 KB

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