Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

1
2
3
4
5
6
7
8
9
//本地预览
npx hexo cl; npx hexo s

//推送更新上线
npx hexo cl; hexo g; hexo d

npx hexo cl; npx hexo g; npx hexo d


删除文章源文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

//1️⃣删除文章源文件

Remove-Item ".\source\_posts\文章名.md"

//2️⃣删除文章相关图片

Remove-Item ".\source\_images\文章名*" -Recurse

//3️⃣重新生成博客删除源文件后,需要重新生成博客,这样public目录里的对应HTML文件才会消失

hexo g

使用管理员身份打开 powershell ,输入以下命令

Set-ExecutionPolicy RemoteSigned