config.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. lastUpdated: 'Last Updated', // 文档更新时间:每个文件git最后提交的时间
  19. nav: [
  20. // { text: '前端算法', link: '/algorithm/' }, // 内部链接 以docs为根目录
  21. {
  22. text: '前端',
  23. items: [
  24. {
  25. text: 'CSS',
  26. link: '/CSS/',
  27. },
  28. {
  29. text: 'flutter',
  30. link: '/FLUTTER/',
  31. },
  32. {
  33. text: 'GIT',
  34. link: '/GIT/',
  35. },
  36. {
  37. text: 'JavaScript',
  38. link: '/JavaScript/',
  39. },
  40. ],
  41. },
  42. {
  43. text: '后台',
  44. items: [
  45. {
  46. text: 'node',
  47. link: '/NODE/',
  48. },
  49. {
  50. text: 'ubuntu',
  51. link: '/UBUNTU/',
  52. },
  53. ],
  54. }, // 外部链接
  55. {
  56. text: '其他',
  57. items: [
  58. {
  59. text: 'IDE',
  60. link: '/IDE/',
  61. },
  62. ],
  63. },
  64. // 下拉列表
  65. {
  66. text: 'GitHub',
  67. link: 'https://github.com/Johnhong9527',
  68. // items: [
  69. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  70. // /* {
  71. // text: '算法仓库',
  72. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  73. // } */
  74. // ]
  75. },
  76. ],
  77. sidebar: {
  78. '/CSS/': [
  79. '',
  80. 'cases',
  81. '2018_10_21_01',
  82. '2018_10_21_02',
  83. '2018_10_21_03',
  84. '2018_10_21_04',
  85. '2018_10_21_05',
  86. 'principle',
  87. ],
  88. '/FLUTTER/': ['', '2018_10_25_01'],
  89. '/GIT/': ['', '2018_10_22_01', '2018_10_22_02'],
  90. '/IDE/': ['', '2018_10_28_01'],
  91. '/JavaScript/': ['', 'one', '2018_10_28_01', '2018_10_29_02'],
  92. '/NODE/': ['', '01_nodejs_phantomjs_nodemailer', '2018_10_28_01'],
  93. '/UBUNTU/': ['', '2018_10_28_01', '2018_10_28_02', '2018_10_28_03'],
  94. },
  95. },
  96. configureWebpack: {
  97. resolve: {
  98. alias: {
  99. '@js': '/docs/.vuepress/components/js',
  100. '@alias': 'path/to/some/dir',
  101. },
  102. },
  103. },
  104. markdown: {
  105. module: {
  106. rules: [
  107. {
  108. test: /\.less$/,
  109. loader: 'less-loader', // compiles Less to CSS
  110. },
  111. ],
  112. },
  113. lineNumbers: true,
  114. // markdown-it-anchor 的选项
  115. // anchor: { permalink: false },
  116. // markdown-it-toc 的选项
  117. // toc: { includeLevel: [1, 2] },
  118. // config: md => {
  119. // // 使用更多的 markdown-it 插件!
  120. // md.use(require('markdown-it-xxx'))
  121. // }
  122. },
  123. };