hexo使用教程与常用命令

欢迎使用Hexo! 更多信息可以查看Hexo官方文档 。如果你在使用过程中遇到任何问题,可以在这提问 或者在GitHub 上留言,这篇文章简单介绍下Hexo的使用以及常用的命令。

使用教程

创建一篇文章

1
2
3
$ hexo new "文章标题"
或者
$ hexo n "文章标题"

更多信息: writing

运行服务器

1
2
3
$ hexo server
或者
$ hexo s

更多信息: Server

生成静态文件

1
2
3
$ hexo generate
或者
$ hexo g

更多信息: Generating

部署到远端

1
2
3
$ hexo deploy
或者
$ hexo d

更多信息:: Deployment

切换主题

获取主题

1
2
cd themes
git clone https://github.com/holysll/hexo-theme-ayer

修改主题配置

1
2
3
4
5
6
7
cd ..
vi _config.yml

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: hexo-theme-ayer

清除缓存并部署

1
2
$ hexo clean
$ hexo g -d
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2019-2020 holysll
  • Visitors: | Views: