-
新建文章(指定嵌套的文件夹、文件名及文章标题)
npx hexo new "[post_title]" -p [folder_path/file_name.md]
- post_title 文章标题
- folder_path 文章所在文件夹
- file_name 文章文件名
-
本地调试
yarn serve
-
部署发布
yarn release # 编译 & 部署
-
其它
yarn build # 编译 yarn clean # 清空 yarn deploy # 部署(到 GitHub Pages)
blog
├── .deploy_git/ # deploy 部署目录
├── node_modules/
├── public/ # 编译结果目录
├── scaffolds/ # 模版
├── src/ # 文章书写
│ ├── _posts/ # 文章
│
├── themes/ # 主题
│
├── _config.yml # hexo 基础配置
├── .gitignore
├── db.json
├── package.json
├── README.md
├── yarn.lock
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.
更详细的 Hexo 命令行说明,请前往:https://hexo.io/zh-cn/docs/commands 。
$ npx hexo new "My New Post"
More info: Writing
$ npx hexo server
More info: Server
$ npx hexo generate
More info: Generating
$ npx hexo deploy
More info: Deployment