Files
OneMD/posts/blog/效率与工具/博客/hexo/hexo简化操作.md
T
2026-06-19 14:45:07 +08:00

30 lines
499 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
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