安装

#安装cli
npm install hexo-cli -g
#博客文件夹
hexo init blog
cd blog
npm install
hexo server

部署到gitee

#1.读取本地SSH
cd ~/.ssh

#2.仓库的SSH地址
git config --global user.name "HchenP"
git config --global user.email "1107383160@qq.com"

#3.创建SSH Key
ssh-keygen -t rsa -C "1107383160@qq.com"
#覆盖--y

#4.获取SSH公钥
cat ~/.ssh/id_rsa.pub

#5.gitee绑定公钥

#6.测速连接
ssh -T git@gitee.com

#7.安装 hexo-deployer-git
npm install hexo-deployer-git --save

#8.blog配置文件_config.yml
deploy:
type: 'git'
repository: SSH地址git@gitee.com:hchenp/hchenp.git

#8.推送博客目录到远程 Gitee
hexo g
hexo d

#9.开启Gitee Pages服务 -- 强制使用HTTPS


编辑

#创建新文章
hexo new "new pages"
#地址
source-->_posts
#清理缓存
hexo clean
hexo c

更新

My-Gitee

#本地预览

#生成网页
hexo g
#启动服务器
hexo s

#部署
hexo g -d
#更新 Gitee Pages 服务

主题–配置

文章配置

---
title: Hello World # 标题
tags: [hello] # 标签
categories: # 分类
description: hello word~ # 描述
top_img: /img/hello-1.png # 顶部背景图
cover: /img/hello-1.png # 文章封面
---

分类 – 标签

#分类
hexo new page categories
#source/categories/index.md

#标签
hexo new page tags
#source/tags/index.md