介绍
使用vuepress_blog搭建的第一篇博客
# 项目初始化
根据 https://www.vuepress.cn/
相关配置
const sideBar = require('./theme/helpers/autoCreateSideBar')
module.exports = {
title: '金色小芝麻',
description: '不畏惧,不将就,未来的日子好好努力。',
// base:'./',
dest: 'dist',
theme: 'reco',
themeConfig: {
codeTheme: "tomorrow",
type: 'blog',
head: [
['link', { rel: 'icon', href: '/favicon.ico' }],
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }]
['script', {}, `
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?b0aae218897fa9d8a9f76e9a77e0b3c6";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`] //百度统计
],
nav: [
{ text: '主页', link: '/', icon: 'reco-home' },
{ text: '时间轴', link: '/timeline/', icon: 'reco-date' },
{
text: '社交', icon: 'reco-message',
items: [
{ text: '掘金', link: 'https://juejin.cn/user/1626932942224398', icon: 'reco-juejin' }
]
},
],
// 博客配置
blogConfig: {
// 在导航栏菜单中所占的位置,默认2 默认文案 “分类”
category: { location: 2, text: '分类' },
tag: { location: 3, text: '标签' },
},
sidebar: sideBar.createSideBar('blogs', []), // 配置两个参数,一个是文章的根目录,第二是白名单(选择性配置)
subSidebar: 'auto', //在所有页面中启用自动生成子侧边栏,原 sidebar 仍然兼容
author: '金色小芝麻',
logo: '/head.jpeg',
authorAvatar: '/head.jpeg',
// 备案
record: '', //icp备案
recordLink: 'https://beian.miit.gov.cn', //icp备案查询地址
// 项目开始时间,只填写年份
startYear: '2021',
info: '2022你好啊',
// 首页文字
mottos: [
{
zh: "愿你保持初心和善良,笑里尽是温暖与坦荡。",
en: "May you keep your original heart and kindness, and smile with warmth and magnanimity."
},
],
// 首页图片
covers: [
'http://www.xxx/home/1.png',
],
socials: {
github: false, //github
gitlab: false, //gitlab
gitee: "", //gitee
jianshu: false, //简书
zhihu: false, //知乎
toutiao: false, //头条
juejin: "", //掘金
segmentfault: false, //思否
csdn: false, //CSDN
wechat: false, //微信
qq: false //QQ
},
// 评论插件
valineConfig: {
appId: "",// your appId
appKey: "", // your appKey
avatar: "wavatar", //
highlight: true, // 代码高亮
recordIP: true, // 记录评论者的IP
enableQQ: true, // 启用昵称框自动获取QQ昵称和QQ头像
requiredFields: ['nick'], //设置必填项
},
friendLink: [ // 友情链接
{
title: 'vuepress-theme-reco',
desc: 'A simple and beautiful vuepress Blog & Doc theme.',
logo: "https://vuepress-theme-reco.recoluan.com/icon_vuepress_reco.png",
link: 'https://vuepress-theme-reco.recoluan.com'
},
],
},
locales: {
'/': {
lang: 'zh-CN'
}
},
plugins: [
// 复制代码功能
["vuepress-plugin-nuggets-style-copy", { copyText: "复制代码", tip: { content: "复制成功!" } }],
// 趣味标题
[
"dynamic-title",
{
// Icon 建议根据自身需求选择
showIcon: "/favicon.ico",
showText: "",
hideIcon: "/favicon.ico",
hideText: "😜下次见喽~",
recoverTime: 2000,
},
],
// 看板娘
[
"@vuepress-reco/vuepress-plugin-kan-ban-niang",
{
theme: ['whiteCat'],
// theme: ['blackCat', 'whiteCat', 'haru1', 'haru2', 'haruto', 'koharu', 'izumi', 'shizuku', 'wanko', 'miku', 'z16']
clean: true,
},
],
]
}