Yangyehan&UndGround.

Hexo_命令行

Word count: 146Reading time: 1 min
2024/01/23

Create hexo

1
2
3
4
5
6
7
8
9
# Hexo 常见命令

Hexo 是一个快速、简洁且高效的博客框架,这里列出了一些常用的 Hexo 命令。

## 安装

```bash
npm install -g hexo-cli

Init blog

1
2
3
hexo init <folder>
cd <folder>
npm install

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Generate static files

1
2
3
$ hexo generate
$ hexo g
#生成静态文件

More info: Generating

Run server

1
2
3
$ hexo server
$ hexo s
# 本地预览

More info: Server

Deploy to remote sites

1
2
3
$ hexo deploy
$ hexo d
# 部署到远程服务器

More info: Deployment

clean db.json and public

1
$ hexo clean

Create Draft and publish

1
2
$ hexo new draft "草稿标题"
$hexo publish "草稿标题"
CATALOG
  1. 1. Create hexo
  2. 2. Init blog
  • Quick Start
    1. 1. Create a new post
    2. 2. Generate static files
    3. 3. Run server
    4. 4. Deploy to remote sites
    5. 5. clean db.json and public
    6. 6. Create Draft and publish