hexo日常操作
Created At :
Views 👀 :
常用
文章
草稿文件
1 2 3 4 5 6 7 8
| hexo new draft <title>
hexo publish <要发布的草稿名称>
hexo server --draft
|
创建文章
模板文件
1 2 3
| hexo new [layout] <title>
|
文件命名
可通过编辑配置中的 new_post_name 更改,例如 :year-:month-:day-:title.md
参考: https://hexo.io/zh-cn/docs/writing
开始书写
分类
1 2 3 4 5 6 7 8 9 10 11
| categories: - [分类1, 子分类1] - [分类2, 子分类2] - [分类3] - [分类4]
categories: - 书写方式1 - 书写方式1子分类
|
标签
参考: https://hexo.io/zh-cn/docs/front-matter
服务
启动服务
1 2
| hexo server -i 192.168.1.1 -p 4500
|
静态模式
1 2 3 4
| hexo generate
hexo server -s
|
进阶
主题安装
以 3-hexo 为例
1 2 3 4 5 6 7 8
| git clone https://github.com/yelog/hexo-theme-3-hexo.git themes/3-hexo
theme: 3-hexo
cd themes/3-hexo git pull
|
参考: https://github.com/yelog/hexo-theme-3-hexo
window命令行自启动服务
1 2 3 4 5
| d: cd D:\项目根路径 hexo server --draft
|
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 harxingxing@163.com