【vuepress】主题vuepress-theme-reco使用及配置

安装及引用

参考官方文档 https://vuepress-theme-reco.recoluan.com/views/1.x/installUse.html

1、安装主题

npm install vuepress-theme-reco --save-dev

2、引用

// docs/.vuepress/config.js
module.exports = {
    title: '壹二呀',
    description: '办法总比问题多',
    base: '/-vuepress-/',
    locales: {
        "/": {
            lang: "zh-CN",
        },
      },
    theme: "reco", // 引入主题
    themeConfig: {
      // 博客配置
    }
}

配置更改

1、首页配置

// docs/README.md
---
home: true
heroText: 今天掉头发了嘛
tagline: 没掉过头发的程序员都不是好的开发
actionText: 快速上手 →
actionLink: /zh/guide/

heroImageStyle: {
  maxHeight: '200px',
  display: block,
  margin: '6rem auto 1.5rem',
  borderRadius: '50%',
  boxShadow: '0 5px 18px rgba(0,0,0,0.2)'
}
---

2、博客配置

// docs/.vuepress/config.js
module.exports = {
    themeConfig: {
        // 博客配置
        blogConfig: {
            category: {
                location: 2,     // 在导航栏菜单中所占的位置,默认2
                text: 'Category' // 默认文案 “分类”
            },
            tag: {
                location: 3,     // 在导航栏菜单中所占的位置,默认3
                text: 'Tag'      // 默认文案 “标签”
            },
            socialLinks: [     // 信息栏展示社交信息
                { icon: 'reco-github', link: 'https://github.com/recoluan' },
                { icon: 'reco-npm', link: 'https://www.npmjs.com/~reco_luan' }
            ],
        },
        // 友情链接
        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'
          },
          {
            title: '午后南杂',
            desc: 'Enjoy when you can, and endure when you must.',
            email: 'recoluan@qq.com',
            link: 'https://www.recoluan.com'
          }
        ],
        // 顶部导航栏
        nav: [           
            //格式一:直接跳转,'/'为不添加路由,跳转至首页
            { text: '首页', link: '/' },    
            
            //格式三:跳转至外部网页,需http/https前缀
            { text: 'Github', link: 'https://github.com/CyanDong/-vuepress-' },
        ],
    }
}

文档编写

1、编写

// docs/blogs/技能/vuepress-theme-reco.md
---
title: 【vuepress】主题vuepress-theme-reco使用及配置
date: 2022-08-09
sidebar: 'auto'
categories:
  - 技能
tags:
  - vuepress
  - vuepress-theme-reco
---
内容内容内容

2、效果
在这里插入图片描述

在这里插入图片描述

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值