hexo常用命令

前置安装

1
2
3
npm i -g hexo-cli

npm install hexo-deployer-git --save

基本命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 新建一个名为new_post的post
hexo n new_post

# 清楚缓存
hexo clear

# 生成
hexo g

# 发布到本地
hexo s

# 发布到github
hexo d

常用命令

1
2
3
4
5
6
7
8
# 本地发布
hexo clear && hexo g && hexo s

# github发布
hexo clear && hexo g && hexo d

# 删除文章
删除 "sourc/_posts" 文件夹中相应的md文件

Front-matter

格式举例如下:

1
2
3
4
5
6
7
8
title: C++给常用数据结构传入排序算法
date: 2022-07-01 16:22:30
tags:
- 刷题
- C++
categories:
- C++
index_img: /post_img/02.jpg

hexo常用命令
http://example.com/2022/07/01/hexo常用命令/
作者
ZYUE
发布于
2022年7月1日
更新于
2022年7月31日
许可协议