vuepress config.js

244 阅读1分钟
module.exports = {
    // 网站标题
    title: '小虎的技术博客',
    description: "生命不息、奋斗不止!",
    // 网站路径名
    base: "/vuepress/",
    // 默认主题设置
    themeConfig: {
		// 显示所有页面的标题链接
		displayAllHeaders: true,
		
		// 开启上一篇、下一篇
		nextLinks: true,
		prevLinks: true,
		
		// 开启内置搜索框,可以使用algolia来替换内置搜索
		search: true,
        searchMaxSuggestions: 5,
		
		// 开启页面滚动
		smoothScroll: true,
		
		// 设置最后更新时间,以git提交时间为准
		lastUpdated: 'Last Updated ', 
		
		// Git仓库和编辑链接
		repo: 'https://gitee.com/withspace/prophet-civilization-history', 
        repoLabel: '查看源码',
        docsDir: 'docs',
        docsBranch: 'master',
        editLinks: true,  
        editLinkText: '帮助我们改善此页面',
		
		// 自动生成侧边栏
		sidebar: 'auto',

		
		// 开启导航栏
		navbar: true,
		logo: '/images/logo.jpg',
        nav: [{
                text: 'Home',
                link: '/'
            },
            {
                text: 'Question',
                link: '/question/问题-类冲突导致作业执行失败'
            },
			{
                text: '学习',
                link: '/study/FlinkX1.7源码分析' // 仅以 / 开头,不写 .md 后缀,默认读取文件夹下对应的 markdown 文件
            },
			{
                text: '文章',
                link: '/article/markdown' // 以/开始和结束,表示读取README.md
            }
        ]
        
    },
    // 插件设置(暂时不生效)
    plugins: ['@vuepress/back-to-top'],
	
	// markdown设置
    markdown: {},
    head: [
        // ...
        ['link', {
            rel: 'stylesheet',
            href: 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css'
        }],
        ['link', {
            rel: "stylesheet",
            href: "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.10.0/github-markdown.min.css"
        }]
    ]
}