hexo 常用命令

title: hexo常用命令

date: 2017-10-30 09:59:03

tags: hexo 教程

本文介绍hexo的常用命令。

hexo

npm install hexo -g #安装

npm update hexo -g #升级

npm init #初始化

服务器

hexo s #启动服务预览并自动更新,无需重启服务器

hexo server -s #静态模式

hexo server -p 5000 #更改端口

hexo server -i 192.168.1.1 #自定义IP

hexo clean #清理缓存

hexo g #生成静态网页

hexo d #开始部署

hexo g -d #生成静态网页并部署,两步并一步

草稿

hexo publish [layout]

模版

hexo new "postName" #新建文章

hexo new page "pageName" #新建页面

hexo server #启动服务预览

hexo generate #生成静态页面

hexo deploy #部署

简写

hexo n "我的博客" == hexo new "我的博客" #新建文章

hexo g == hexo generate #生成

hexo s == hexo server #启动服务预览

hexo d == hexo deploy #部署

设置文章摘要

![more](hexo命令/more.png)

报错

error:ERROR Deployer not found: git

解决方法

npm install hexo-deployer-git --save

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容