HexoStart
上次更新: 2026-01-03 03:32:35
title: HexoStart
date: 2024-07-06 22:45:22
tags:
- Hexo
status: doing
categories:
- Hexo
top: 0
status
用于区分文章的状态,同时利用文章分类列表的筛选,进行快速筛选,Cosy 主题内置了 4 种状态
- done: 完成
- doing: 进行中
- todo: 待办
- other: 废弃
categories
类别
本地启动与发布
站点目录:
cd /Users/recovery/Documents/blog/blog
1. 安装依赖
npm install
2. 本地启动(预览)
hexo server
也可以用 npm 脚本:
npm run server
3. 清理缓存与生成物
hexo clean
也可以用 npm 脚本:
npm run clean
4. 生成静态页面(编译)
hexo generate
简写:
hexo g
也可以用 npm 脚本:
npm run build
生成结果在 public/ 目录。
5. 部署
hexo deploy
简写:
hexo d
也可以用 npm 脚本:
npm run deploy
常用发布流程:
hexo clean && hexo g && hexo d
Algolia 搜索索引
生成并上传 Algolia 索引:
hexo algolia
建议在发布前更新一次索引(先生成再推索引):
hexo clean && hexo g && hexo algolia
常用写作命令
新建文章:
hexo new post "标题"
直接生成到子目录(用于分类整理):
hexo new post "工具/新文章标题"
RecoveryAshes Blog