1+ module . exports = {
2+ base : '/' , // 用于部署时的子路径
3+ title : 'csxiaoyao.com' , // 网站的标题
4+ description : 'luban document, created by victorsun' , // 网站描述,HTML中表现为一个 <meta> 标签
5+ head : [ // head 中额外标签
6+ // ['link', { rel: 'icon', href: '/logo.png' }]
7+ ] ,
8+ host : '0.0.0.0' , // dev 服务器的主机
9+ port : 2048 , // dev 服务器的端口
10+ dest : './dist' , // 指定 vuepress build 的输出目录
11+ evergreen : false , // 忽略浏览器兼容性
12+ markdown : {
13+ lineNumbers : true , // 代码块的左侧显示行号
14+ externalLinks : { target : '_blank' , rel : 'noopener noreferrer' } , // 键和值对将被添加到指向外部链接的 <a> 标签,默认选项将在新窗口中打开外部链接
15+ anchor : { permalink : true , permalinkBefore : true , permalinkSymbol : '#' } , // 锚点配置
16+ toc : { includeLevel : [ 1 , 2 , 3 ] } , // [[toc]]目录
17+ config : md => { // 插件
18+ // md.set({ breaks: true })
19+ // md.use(require('markdown-it-xxx'))
20+ }
21+ } ,
22+ themeConfig : {
23+ nav : [ // 导航栏
24+ {
25+ text : '主页' ,
26+ link : '/'
27+ } , {
28+ text : '菜单' ,
29+ items : [ {
30+ text : '普通菜单' ,
31+ link : '/'
32+ } , {
33+ text : '分组菜单' ,
34+ items : [ {
35+ text : 'test1' ,
36+ link : '/test1'
37+ } , {
38+ text : 'test2' ,
39+ link : '/test2'
40+ } ]
41+ } ]
42+ } , {
43+ text : '访问主页' ,
44+ link : 'http://www.csxiaoyao.com'
45+ }
46+ ] ,
47+ // 侧边栏
48+ sidebar : [
49+ '/test1' ,
50+ [ '/test1' , '链接到test1' ] ,
51+ {
52+ title : '链接到test2' ,
53+ collapsable : false ,
54+ children : [
55+ '/test1' ,
56+ '/test2' ,
57+ ]
58+ }
59+ ] ,
60+ // 展开所有标题层级
61+ displayAllHeaders : false ,
62+ // 激活标题链接
63+ activeHeaderLinks : true , // false 可以提高性能
64+ // 搜索
65+ search : true ,
66+ searchMaxSuggestions : 10 ,
67+ // 更新时间戳 git
68+ lastUpdated : 'Last Updated' , // string | boolean
69+ // serviceWorker
70+ serviceWorker : {
71+ updatePopup : true , // 弹窗提示更新 Boolean | Object, 默认值是 undefined
72+ // 如果设置为 true, 默认的文本配置将是:
73+ updatePopup : {
74+ message : "有内容更新" ,
75+ buttonText : "更新"
76+ }
77+ } ,
78+ // 假定 GitHub,也可以是一个完整的 GitLab URL
79+ repo : 'csxiaoyaojianxian/JavaScriptStudy' ,
80+ // 自定义项目仓库链接文字,默认根据 `themeConfig.repo` 中的 URL 来自动匹配是 "GitHub"/"GitLab"/"Bitbucket" 中的哪个,如果不设置时是 "Source"
81+ repoLabel : '访问仓库' ,
82+ // 以下为可选的 "Edit this page" 链接选项,如果你的文档和项目位于不同仓库:
83+ docsRepo : 'vuejs/vuepress' ,
84+ // 如果你的文档不在仓库的根目录下:
85+ docsDir : 'docs' ,
86+ // 如果你的文档在某个特定的分支(默认是 'master' 分支):
87+ docsBranch : 'master' ,
88+ // 默认为 false,设置为 true 来启用
89+ editLinks : true ,
90+ // 自定义编辑链接的文本。默认是 "Edit this page"
91+ editLinkText : '修改此页'
92+ }
93+ }
0 commit comments