hexo
1  | npm install hexo -g #安装  | 
简写
1  | hexo n "我的博客" == hexo new "我的博客" #新建文章  | 
服务器
1  | hexo server #Hexo 会监视文件变动并自动更新,您无须重启服务器。  | 
监视文件变动
1  | hexo generate #使用 Hexo 生成静态文件快速而且简单  | 
草稿
1  | hexo publish [layout] <title>  | 
模版
1  | hexo new "postName" #新建文章  | 
| 变量 | 描述 | 
|---|---|
| layout | 布局 | 
| title | 标题 | 
| date | 建立 | 
1  | title: 使用Hexo搭建个人博客  | 
设置文章摘要
以上是文章摘要 以下是余下全文
写作
1  | hexo new page <title>  | 
1  | 变量 描述  | 
推送到服务器上
1  | hexo n #写文章  | 
报错
1.找不到git部署
1  | ERROR Deployer not found: git  | 
解决方法
1  | npm install hexo-deployer-git --save  | 
3.部署类型设置git
hexo 3.0 部署类型不再是github,_config.yml 中修改
1  | # Deployment  | 
- xcodebuild
 
1  | xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance  | 
- RSS不显示
安装RSS插件 
1  | npm install hexo-generator-feed --save  | 
开启RSS功能
编辑hexo/_config.yml,添加如下代码:
1  | rss: /atom.xml #rss地址 默认即可  | 
开启评论
1.我使用多说代替自带的评论,在多说 网站注册 > 后台管理 > 添加新站点 > 工具 === 复制通用代码 里面有 short_name
1 在根目录 _config.yml 添加一行 disqus_shortname: jslite 是在多说注册时产生的
复制到 themes\landscape\layout\_partial\article.ejs
2 把
1  | <% if (!index && post.comments && config.disqus_shortname){ %>  | 
改为
1  | <% if (!index && post.comments && config.disqus_shortname){ %>  |