config.js 3.1 KB

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