Hexo + Yilia快速搭建个人博客网站

以下命令涉及配置github、安装hexo、安装yilia主题、deploy配置

安装

# 配置 github
git config --global user.name 'longxiaojiangi'
git config --global user.email '[email protected]'
ssh-keygen -t rsa -C '[email protected]' # 三次回车
# 到github添加完ssh
ssh [email protected]
# 安装 hexo,在Blog文件夹父目录打开Git bash
npm install -g hexo-cli
hexo init blog
cd blog
npm install
npm install hexo-deployer-git --save
# 安装 yilia
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
cd themes/yilia
git pull
# 在blog目录打开git bash
npm i hexo-generator-json-content --save

配置

deploy:
    type: git
    repo: [email protected]:longxiaojiangi/longxiaojiangi.github.io.git
    branch: master
jsonContent:
    meta: false
    pages: false
    posts:
      title: true
      date: true
      path: true
      text: false
      raw: false
      content: false
      slug: false
      updated: false
      comments: false
      link: false
      permalink: false
      excerpt: false
      categories: false
      tags: true

你可能感兴趣的:(Hexo + Yilia快速搭建个人博客网站)