config.2.js 2.9 KB

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