config.js 3.0 KB

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