config.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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: 'vue',
  43. link: '/VUE/',
  44. },
  45. ],
  46. },
  47. {
  48. text: '后台',
  49. items: [
  50. {
  51. text: 'node',
  52. link: '/NODE/',
  53. },
  54. {
  55. text: 'ubuntu',
  56. link: '/UBUNTU/',
  57. },
  58. ],
  59. }, // 外部链接
  60. {
  61. text: '其他',
  62. items: [
  63. {
  64. text: 'IDE',
  65. link: '/IDE/',
  66. },
  67. {
  68. text: '待了解',
  69. link: '/About/WHY.md',
  70. },
  71. {
  72. text: '面试',
  73. link: '/INTERVIEW/',
  74. },
  75. ],
  76. },
  77. // 下拉列表
  78. {
  79. text: 'GitHub',
  80. link: 'https://github.com/Johnhong9527',
  81. // items: [
  82. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  83. // /* {
  84. // text: '算法仓库',
  85. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  86. // } */
  87. // ]
  88. },
  89. ],
  90. sidebar: {
  91. '/CSS/': [
  92. '',
  93. 'cases',
  94. '2018_10_21_01',
  95. '2018_10_21_02',
  96. '2018_10_21_03',
  97. '2018_10_21_04',
  98. '2018_10_21_05',
  99. 'principle',
  100. ],
  101. '/FLUTTER/': ['', '2018_10_25_01'],
  102. '/GIT/': ['', '2018_10_22_01', '2018_10_22_02', '2018_10_31_01'],
  103. '/IDE/': ['', '2018_10_28_01'],
  104. '/INTERVIEW/': ['', 'BasicAjax', 'HTTP', 'Terminology'],
  105. '/JavaScript/': ['', 'one', '2018_10_29_02', '2018_10_28_01'],
  106. '/NODE/': ['', '01_nodejs_phantomjs_nodemailer', '2018_10_28_01'],
  107. '/UBUNTU/': ['', '2018_10_28_01', '2018_10_28_02', '2018_10_28_03'],
  108. '/VUE/': ['', '2018_10_31_01', '2018_10_31_02'],
  109. },
  110. },
  111. configureWebpack: {
  112. resolve: {
  113. alias: {
  114. '@js': '/docs/.vuepress/components/js',
  115. '@alias': 'path/to/some/dir',
  116. },
  117. },
  118. },
  119. markdown: {
  120. module: {
  121. rules: [
  122. {
  123. test: /\.less$/,
  124. loader: 'less-loader', // compiles Less to CSS
  125. },
  126. ],
  127. },
  128. lineNumbers: true,
  129. // markdown-it-anchor 的选项
  130. // anchor: { permalink: false },
  131. // markdown-it-toc 的选项
  132. // toc: { includeLevel: [1, 2] },
  133. // config: md => {
  134. // // 使用更多的 markdown-it 插件!
  135. // md.use(require('markdown-it-xxx'))
  136. // }
  137. },
  138. };