config.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. module.exports = {
  2. title: '看白鹿的博客',
  3. description: '只有敢于尝试,才能品味人生.',
  4. base: '/',
  5. head: [
  6. // ['link', { rel: 'icon', href: '/favicon.ico' }], // 增加一个自定义的 favicon(网页标签的图标)
  7. [
  8. 'link',
  9. {
  10. rel: 'icon',
  11. href: '/logo.png',
  12. },
  13. ], // 增加一个自定义的 favicon(网页标签的图标)
  14. ],
  15. themeConfig: {
  16. sidebarDepth: 3, // e'b将同时提取markdown中h2 和 h3 标题,显示在侧边栏上。
  17. lastUpdated: 'Last Updated', // 文档更新时间:每个文件git最后提交的时间
  18. nav: [
  19. // { text: '前端算法', link: '/algorithm/' }, // 内部链接 以docs为根目录
  20. {
  21. text: '前端',
  22. items: [
  23. {
  24. text: 'CSS',
  25. link: '/CSS/',
  26. },
  27. {
  28. text: 'flutter',
  29. link: '/FLUTTER/',
  30. },
  31. {
  32. text: 'GIT',
  33. link: '/GIT/',
  34. },
  35. {
  36. text: 'JavaScript',
  37. link: '/JavaScript/',
  38. },
  39. ],
  40. },
  41. {
  42. text: '后台',
  43. items: [
  44. {
  45. text: 'node',
  46. link: '/NODE/',
  47. },
  48. {
  49. text: 'ubuntu',
  50. link: '/UBUNTU/',
  51. },
  52. ],
  53. }, // 外部链接
  54. {
  55. text: '其他',
  56. items: [
  57. {
  58. text: 'IDE',
  59. link: '/IDE/',
  60. },
  61. ],
  62. },
  63. // 下拉列表
  64. {
  65. text: 'GitHub',
  66. link: 'https://github.com/Johnhong9527',
  67. // items: [
  68. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  69. // /* {
  70. // text: '算法仓库',
  71. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  72. // } */
  73. // ]
  74. },
  75. ],
  76. sidebar: {
  77. '/CSS/': [
  78. '',
  79. 'cases',
  80. '2018_10_21_01',
  81. '2018_10_21_02',
  82. '2018_10_21_03',
  83. '2018_10_21_04',
  84. '2018_10_21_05',
  85. 'principle',
  86. ],
  87. '/FLUTTER/': ['', '2018_10_25_01'],
  88. '/GIT/': ['', '2018_10_22_01', '2018_10_22_02'],
  89. '/IDE/': ['', '2018_10_28_01'],
  90. '/JavaScript/': ['', 'one', '2018_10_28_01', '2018_10_29_02'],
  91. '/NODE/': ['', '01_nodejs_phantomjs_nodemailer', '2018_10_28_01'],
  92. '/UBUNTU/': ['', '2018_10_28_01', '2018_10_28_02', '2018_10_28_03'],
  93. },
  94. },
  95. configureWebpack: {
  96. resolve: {
  97. alias: {
  98. '@js': '/docs/.vuepress/components/js',
  99. '@alias': 'path/to/some/dir',
  100. },
  101. },
  102. },
  103. markdown: {
  104. module: {
  105. rules: [
  106. {
  107. test: /\.less$/,
  108. loader: 'less-loader', // compiles Less to CSS
  109. },
  110. ],
  111. },
  112. lineNumbers: true,
  113. // markdown-it-anchor 的选项
  114. // anchor: { permalink: false },
  115. // markdown-it-toc 的选项
  116. // toc: { includeLevel: [1, 2] },
  117. // config: md => {
  118. // // 使用更多的 markdown-it 插件!
  119. // md.use(require('markdown-it-xxx'))
  120. // }
  121. },
  122. };