hexo再部署

安装

通过Node.js安装hexo

1
npm install -g hexo-cli

在新建文件夹内执行初始化命令

1
2
hexo init
npm install

更改主题

主题:Next

1
npm install hexo-theme-next

修改_config.yml

1
2
# theme: landscape
theme: next
添加备案

修改主题下的_config.yml

1
2
3
4
5
6
7
8
9
10
11
# Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn
beian:
enable: true
icp: xxx
# The digit in the num of gongan beian.
gongan_id: xxx
# The full num of gongan beian.
gongan_num:
# The icon for gongan beian. See: http://www.beian.gov.cn/portal/download
gongan_icon_url: http://www.beian.gov.cn/img/new/gongan.png

写文章

1
hexo new 文章名

文章头部

1
2
3
4
5
6
title: hexo再部署
date: 2022-06-14 23:07:13
tags:
- hexo
categories:
- 技术

部署

服务器安装git,设置好用户,git仓库,钩子

修改_config.yml

执行 hexo d

配置Nginx