30 lines
499 B
Markdown
30 lines
499 B
Markdown
---
|
||
title: hexo简化操作
|
||
date: 2025-09-15 04:53:57
|
||
tags: [hexo]
|
||
---
|
||
|
||
### 简化运行操作
|
||
|
||
**1、一条命令运行 `hexo clean、hexo g、hexo s`**
|
||
在 `package.json` 里加一个脚本命令:
|
||
|
||
```json
|
||
{
|
||
"scripts": {
|
||
"dev": "hexo clean && hexo g && hexo s"
|
||
}
|
||
}
|
||
```
|
||
|
||
以后直接执行:
|
||
|
||
```
|
||
npm run dev
|
||
```
|
||
|
||
就等同于 `hexo clean && hexo g && hexo s`。
|
||
(或者在 `bash/zsh` 下自己写 alias:`alias hcs="hexo clean && hexo g && hexo s"`)
|
||
|
||
### 自动生成 Front-matter
|