Config.js configuration

4/9/2019

# Mobile Optimization

On a mobile device, the search box can be zoomed in when focused, and scrolled left or right when not focused. This can be done by setting the meta.

// .vuepress/config.js
module.exports = {
  head: [
    ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }]
  ]
}  

# Icon

You can use the theme's built-in icons in the navigation bar as follows:

{ text: 'Tags', link: '/tags/', icon: 'reco-tag' }
  1. The theme support the Font Awesome free icon (opens new window)
  2. The theme has the following built-in icons for you to choose:
  • FAQ

    reco-faq

  • 置顶

    reco-sticky

  • 加密

    reco-lock

  • Email

    reco-mail

  • 豆瓣

    reco-douban

  • 微信

    reco-wechat

  • 颜色板

    reco-color

  • 思否

    reco-sf

  • 消息

    reco-message

  • 眼睛

    reco-eye

  • 搜索

    reco-search

  • 分类

    reco-category

  • NPM

    reco-npm

  • 菜单

    reco-menu

  • 建议

    reco-suggestion

  • Coding

    reco-coding

  • GitHub

    reco-github

  • 其他

    reco-other

  • 首页

    reco-home

  • 文档

    reco-document

  • 华为

    reco-huawei

  • 回到顶部

    reco-up

  • 微博

    reco-weibo

  • 标签

    reco-tag

  • 日期

    reco-date

  • 博客园

    reco-bokeyuan

  • 备案

    reco-beian

  • 版权

    reco-copyright

  • 哔哩哔哩

    reco-bilibili

  • 账号

    reco-account

  • 简书

    reco-jianshu

  • QQ

    reco-qq

  • 主题

    reco-theme

  • reco-three

  • GitLab

    reco-gitlab

  • 博客

    reco-blog

  • 码云

    reco-mayun

  • 知乎

    reco-zhihu

  • Facebook

    reco-facebook

  • 淘宝

    reco-taobao

  • 通知

    reco-tongzhi

  • 抖音

    reco-douyin

  • V2EX

    reco-v2ex

  • 今日头条

    reco-toutiao

  • 领英

    reco-linkedin

  • Twitter

    reco-twitter

  • API

    reco-api

  • CSDN

    reco-csdn

  • 掘金

    reco-juejin

# Recording information and project start time

The ICP record link and the Ministry of Public Security record will become effective after 1.2.0.

// .vuepress/config.js
module.exports = {
  themeConfig: {
     // record
     record: 'ICP Filing Copy',
     recordLink: 'ICP record link',
     cyberSecurityRecord: 'Recorded by the Ministry of Public Security',
     cyberSecurityLink: 'The Ministry of Public Security record link',
     // Project start time, only year
     startYear: '2017'
  }
}

# Set author name

  1. Set the global author name
// .vuepress/config.js
module.exports = {
  themeConfig: {
    // author
    author: 'reco_luan'
  }
}
  1. Set the author's name for a single article
---
title: You Haven't Really Worked Hard before You Yield to Laziness
date: 2015-04-23
categories: article
author: Dudu
---

# Support Huawei

The home page can display 华为,为中华而为之!.

// .vuepress/config.js
module.exports = {
  themeConfig: {
    huawei: true
  }
}

The logo can be displayed on the left side of the navigation bar, and the following configuration is required.

// .vuepress/config.js
module.exports = {
  themeConfig: {
    logo: '/head.png'
  }
}