config.1.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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: 2, // e'b将同时提取markdown中h2 和 h3 标题,显示在侧边栏上。
  16. lastUpdated: 'Last Updated', // 文档更新时间:每个文件git最后提交的时间
  17. nav: [
  18. // { text: '前端算法', link: '/algorithm/' }, // 内部链接 以docs为根目录
  19. {
  20. text: '博客',
  21. link: '/CSS/',
  22. }, // 外部链接
  23. {
  24. text: '导航',
  25. items: [
  26. {
  27. text: 'CSS',
  28. link: '/CSS/',
  29. },
  30. ],
  31. },
  32. // 下拉列表
  33. {
  34. text: 'GitHub',
  35. link: 'https://github.com/Johnhong9527',
  36. // items: [
  37. // { text: 'GitHub地址', link: 'https://github.com/Johnhong9527' },
  38. // /* {
  39. // text: '算法仓库',
  40. // link: 'https://github.com/OBKoro1/Brush_algorithm'
  41. // } */
  42. // ]
  43. },
  44. ],
  45. sidebar: [
  46. {
  47. title: 'CSS',
  48. children: [
  49. '/CSS/',
  50. '/CSS/cases.md',
  51. '/CSS/2018_10_21_01.md',
  52. '/CSS/2018_10_21_02.md',
  53. '/CSS/2018_10_21_03.md',
  54. '/CSS/2018_10_21_04.md',
  55. '/CSS/2018_10_21_05.md',
  56. '/CSS/principle.md',
  57. ],
  58. },
  59. {
  60. title: 'flutter',
  61. children: ['/FLUTTER/2018_10_25_01.md'],
  62. },
  63. {
  64. title: 'GIT',
  65. children: ['/GIT/2018_10_22_01.md', '/GIT/2018_10_22_02.md'],
  66. },
  67. {
  68. title: 'IDE',
  69. children: ['/IDE/2018_10_28_01.md'],
  70. },
  71. {
  72. title: 'javascript',
  73. children: [
  74. '/JavaScript/one.md',
  75. '/JavaScript/2018_10_28_01.md',
  76. '/JavaScript/2018_10_29_02.md',
  77. ],
  78. },
  79. {
  80. title: 'NODE',
  81. children: [
  82. '/NODE/01_nodejs_phantomjs_nodemailer.md',
  83. '/NODE/2018_10_28_01.md',
  84. ],
  85. },
  86. {
  87. title: 'ubuntu',
  88. children: [
  89. '/UBUNTU/2018_10_28_01.md',
  90. '/UBUNTU/2018_10_28_02.md',
  91. '/UBUNTU/2018_10_28_03.md',
  92. ],
  93. },
  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. };
  124. /*
  125. ## 侧边栏组(sidebar groups)
  126. [
  127. {
  128. title: 'vue',
  129. // collapsable: false,
  130. children: [
  131. '/VUE/',
  132. '/VUE/three',
  133. '/VUE/four'
  134. ]
  135. },
  136. {
  137. title: 'js',
  138. children: [
  139. '/JS/',
  140. '/JS/one',
  141. '/JS/two'
  142. ]
  143. }
  144. ]
  145. ##
  146. '/JS/': [
  147. {
  148. title: 'js的',
  149. children: [
  150. '/JS/',
  151. '/JS/one',
  152. '/JS/two'
  153. ]
  154. }, {
  155. title: 'js',
  156. children: [
  157. '/JS/',
  158. '/JS/one',
  159. '/JS/two'
  160. ]
  161. }
  162. ]
  163. */