使用hexo安装博客

初始化

1
2
3
hexo init blog
cd blog
hexo s == hexo server 进行预览

修改中文语言

1
2
修改 _config.yml
language: zh-CN

安装主题

1
2
3
git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus
修改 _config.yml theme: icarus
可能会报错,根据提示安装

部署,使用username.github.io进行访问

1
2
3
4
5
6
7
8
1. 安装deploy插件
npm install hexo-deployer-git --save
2. 配置_config.yml
deploy:
type: git
repo: git@github.com:<username>/<username>.github.io.git
branch: master
3. hexo d

自定义域名

1
2
1. 域名解析,添加一条CNAME记录, 值埴上<username>.github.io
2. 进入到<username>.githut.io.git项目中,Settings->Pages页面找到Custom domain填上你的域名,校验完后Enforce HTTPS

最后一步

1
source目录下新建CNAME的文件,内容填上你的自定义域名(xxxx.yyy),重新推送一次

添加分类 2021-08-24

1
2
3
4
5
6
7
8
9
10
11
12
13
14
1. hexo new page categories
2. 修改成 /source/categories/index.md
---
title: 文章分类
date: 2017-05-27 13:47:40
type: "categories"
---
3. 在文章上加上
---
title: jQuery对表单的操作及更多应用
date: 2017-05-26 12:12:57
categories:
- web前端
---
作者

建指所向

发布于

2021-08-21

更新于

2023-11-07

许可协议