hexo常用命令笔记

hexo

npm install -g hexo
npm update -g hexo
hexo init 

常用

hexo n == hexo new "a new post"  新建文章,最好用双引号括起来

hexo g == hexo generate     生成静态文件到public文件夹

hexo s == hexo server    Server at localhost:4000,根目录为public

hexo d == hexo deploy   部署到远程服务里,例如github

hexo p == hexo publish  新建草稿draft

hexo clean     清除缓存文件

hexo new page "about" 生成 /source/about/index.md 文件

服务器

hexo server    默认为动态监听

hexo server -s   静态模式

hexo server -p 5000  指定端口

hexo server -i 10.20.62.123   指定IP

文章摘要  

方式1:在front-matter中编写

description: "This a digest bla bla..."

方式2

在文章中插入一行 <!--more--> 以上部分为摘要

 添加RSS

npm install hexo-generator-feed --save

使用方法:在hexo/_config.yml中添加
feed:
  type: atom
  path: atom.xml
  limit: 20
  hub: 

重新 hexo g 就会在public中生成atom.xml了

然后可以在所用的theme的_config.yml中添加菜单

  menu:

   ...

     RSS: /atom.xml

     ...


添加sitemap

npm install hexo-generator-sitemap --save

_config.yml

sitemap:
    path: sitemap.xml

 

 

 

 

 

 

转载于:https://www.cnblogs.com/roronoa-sqd/p/5510776.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值