config.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. },
  73. // 下拉列表
  74. {
  75. text: 'GitHub',
  76. link: 'https://github.com/Johnhong9527',
  77. // items: [
  78. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  79. // /* {
  80. // text: '算法仓库',
  81. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  82. // } */
  83. // ]
  84. },
  85. ],
  86. sidebar: {
  87. '/CSS/': [
  88. '',
  89. 'cases',
  90. '2018_10_21_01',
  91. '2018_10_21_02',
  92. '2018_10_21_03',
  93. '2018_10_21_04',
  94. '2018_10_21_05',
  95. 'principle',
  96. ],
  97. '/FLUTTER/': ['', '2018_10_25_01'],
  98. '/GIT/': ['', '2018_10_22_01', '2018_10_22_02', '2018_10_31_01'],
  99. '/IDE/': ['', '2018_10_28_01'],
  100. '/JavaScript/': ['', 'one', '2018_10_29_02', '2018_10_28_01'],
  101. '/NODE/': ['', '01_nodejs_phantomjs_nodemailer', '2018_10_28_01'],
  102. '/UBUNTU/': ['', '2018_10_28_01', '2018_10_28_02', '2018_10_28_03'],
  103. '/VUE/': ['', '2018_10_31_01', '2018_10_31_02'],
  104. },
  105. },
  106. configureWebpack: {
  107. resolve: {
  108. alias: {
  109. '@js': '/docs/.vuepress/components/js',
  110. '@alias': 'path/to/some/dir',
  111. },
  112. },
  113. },
  114. markdown: {
  115. module: {
  116. rules: [
  117. {
  118. test: /\.less$/,
  119. loader: 'less-loader', // compiles Less to CSS
  120. },
  121. ],
  122. },
  123. lineNumbers: true,
  124. // markdown-it-anchor 的选项
  125. // anchor: { permalink: false },
  126. // markdown-it-toc 的选项
  127. // toc: { includeLevel: [1, 2] },
  128. // config: md => {
  129. // // 使用更多的 markdown-it 插件!
  130. // md.use(require('markdown-it-xxx'))
  131. // }
  132. },
  133. };