以下命令涉及配置github、安装hexo、安装yilia主题、deploy配置
安装
# 配置 github
git config --global user.name 'longxiaojiangi'
git config --global user.email 'longxiaojiangi@163.com'
ssh-keygen -t rsa -C 'longxiaojiangi@163.com' # 三次回车
# 到github添加完ssh
ssh git@github.com
# 安装 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: git@github.com: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