config.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. },
  103. // 下拉列表
  104. {
  105. text: "GitHub",
  106. link: "https://github.com/Johnhong9527"
  107. // items: [
  108. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  109. // /* {
  110. // text: '算法仓库',
  111. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  112. // } */
  113. // ]
  114. }
  115. ],
  116. sidebar: {
  117. "/CSS/": [
  118. "",
  119. "cases",
  120. "2018_10_21_01",
  121. "2018_10_21_02",
  122. "2018_10_21_03",
  123. "2018_10_21_04",
  124. "2018_10_21_05",
  125. "principle",
  126. "2019_04_11_01"
  127. ],
  128. "/FLUTTER/": ["", "2018_10_25_01"],
  129. "/GIT/": ["", "2018_10_22_01", "2018_10_22_02", "2018_10_31_01"],
  130. "/IDE/": ["", "2018_10_28_01"],
  131. "/INTERVIEW/": ["", "BasicAjax", "HTTP", "Terminology"],
  132. "/JavaScript/": [
  133. "",
  134. // '01',
  135. "2018_10_29_02",
  136. "2018_10_28_01",
  137. "2018_11_02_01",
  138. "2018_11_02_02",
  139. "2018_11_02_03",
  140. "2018_11_02_04",
  141. "2018_11_02_05"
  142. ],
  143. "/NODE/": [
  144. "",
  145. "01_nodejs_phantomjs_nodemailer",
  146. "2018_10_28_01",
  147. "2020-01-16.md"
  148. ],
  149. "/REACT/": ["", "2018_11_02_01"],
  150. "/UBUNTU/": [
  151. "",
  152. "2018_10_28_01",
  153. "2018_10_28_02",
  154. "2018_10_28_03",
  155. "2019_01_11"
  156. ],
  157. "/VUE/": [
  158. "",
  159. "2018_10_31_01",
  160. "2018_10_31_02",
  161. "2018_11_02_01",
  162. "2018_11_02_02",
  163. "2018_11_02_03",
  164. "2018_11_02_04"
  165. ]
  166. },
  167. algolia: {
  168. apiKey: "f155116ae3f199b1d79b55adf623b6d8",
  169. indexName: "honghaitao"
  170. }
  171. },
  172. configureWebpack: {
  173. resolve: {
  174. alias: {
  175. "@js": "/docs/.vuepress/components/js",
  176. "@alias": "path/to/some/dir"
  177. }
  178. }
  179. },
  180. markdown: {
  181. module: {
  182. rules: [
  183. {
  184. test: /\.less$/,
  185. loader: "less-loader" // compiles Less to CSS
  186. }
  187. ]
  188. },
  189. lineNumbers: true
  190. // markdown-it-anchor 的选项
  191. // anchor: { permalink: false },
  192. // markdown-it-toc 的选项
  193. // toc: { includeLevel: [1, 2] },
  194. // config: md => {
  195. // // 使用更多的 markdown-it 插件!
  196. // md.use(require('markdown-it-xxx'))
  197. // }
  198. }
  199. };