一、Hexo搭建博客
- 下载node.js并安装
- 在git运行框输入npm install -g hexo-cli安装hexo
- 建立博客文件夹
- hexo init初始化文件
- hexo install安装一些依赖包
- npm install hexo-deployer-git --save安装插件
- 在github建立博客仓库,仓库名为:用户名.github.io
并复制ssh地址 - 用vscode打开_config.yml文件
type: git
repo: 仓库ssh地址
branch: master
注意冒号后面有个空格 - hexo g -d 上传至github
二、建立标签、分类、归档及关于我
- hexo new page “tages”
- 打开显示文件路径,添加type:“tags”
- 打开主题内的_config.yml将标签的注释取消
对应关系
page | type | 内容 |
---|---|---|
tages | tages | 标签 |
categories | categories | 分类 |
archives | archives | 归档 |
about | about | 关于我 |