Hexo 常用命令

Hexo 常用命令

官方文档

  1. 把本地文件上传blog

    hexo clean
    hexo generate
    hexo deploy
    
  2. 新建文章

    hexo new “文章题目”
    
  3. 新建另一页(如关于,标签,分类)

    hexo new page "about"
    
  4. 分类下显示你所编写的标签

    ---
    title: categories
    date: 2016-09-14 11:54:11
    type: "categories" #这句话不能少
    comments: false   #去除多说评论框
    
    ---
    
  5. 添加多说评论

    • 多说官网 “我要安装”

    • 在 next 主题设置shortName

      # Duoshuo ShortName #不能去掉注释 
      duoshuo_shortname: your_short_name
      
  6. 文章添加多个标签

    tags: [tag1,tag2,tag3] #冒号后面添加空格
    
  7. 关于标题设置

    ~/Hexo/themes/next/layout/index.swig 
    
1
2
3
4
5
6
7
<!--设置的标题 + 主题的描述-->
{% block title %} {{ config.title }} - {{ theme.description }} {% endblock %}
<!--主题关键字 + 标题 + 主题描述-->
{% block title %} {{ theme.keywords }} - {{ config.title }} - {{ theme.description }} {% endblock %}
{% block title %} {{ config.title }} {% endblock %}