//

Hexo

使用之前需要先安装hexo-deployer-git、npm、hexo(这是显然的),使用deploy之后可以避免烦人的git操作,同时非常便于维护

指令 说明
hexo clean 清除本地已部署的静态页面(每次使用hexo g前请务必使用)
hexo g 全称hexo genarate,在本地创建静态页面
hexo d 部署到_config.yml中所写的网页
hexo s 全称hexo server --debug,在本地查看网页
hexo new page custom-name 新建一个页面
hexo new post name 新建一个推文

注意,请确保你每篇文章开头都具有header,例如:

1
2
3
4
title:
date:
type:
---

其中的内容你可以自己指定

否则会有小概率出现报错
YAMLException: end of the stream or a document separator is expected (41:1)
而导致内容无法正常显示

“小概率”是因为本站半数以上的文章都没有添加header :)

0%