Hexo Commands

Hexo Commands

Create Post

1
hexo new post "new post"

Then you will find “new post” stored in the path “/source/_posts/new post”

Create Draft

1
hexo new draft "new draft"

Then you will find “new draft” stored in the path “/source/_drafts/new draft”
If you have finished your draft ,and you want to publish it.

1
hexo publish "new draft"

Then you will find “new draft” in the path “/source/_posts/new draft”

Create Categories

1
hexo new page categories

Then you will find the file “index.md” in the path “/source/categories/index.md”,open and change it to

1
2
3
title: categories
date: 2025-08-17 17:23:10
type: "categories"

Save and close the file, and you can add “categories” in your posts.

1
2
3
4
5
title: object post
date: 2025-08-17 17:23:10
categories:
- first category
- second category

Create Tags

Similar to “Create Categories”

1
hexo new page tags

Change index.md to

1
2
3
title: tags
date: 2025-08-19 12:25:09
type: "tags"

Save and close the file, and you can add “tags” in your posts.

1
2
3
4
5
6
title: esp32
date: 2025-08-18 00:24:37
categories:
- MCU
tags:
- study notes

Add Images

I advise you create a folder in the path “/source/images”
Then you can copy your images to this folder, and then copy the image that in the folder you have created.

1
2
![test](E:\Hexo-Blog\source\images\test.png)
//In Typora, you will have this format.

If your server were running on a Windows operating system,change it to:

1
![test](\images\test.png)

If your server were running on a Linux operating system,change it to:

1
![test](/images/test.png)//Actually you can use this format in windows server,too.

Then you can find the image in your websites!

test3

test

Remote Blog Posting

🧐Attention: You need to set your git and your server , detailed tutorial will be posted later.

1
2
hexo clean
hexo g -d