目录

[IOT]

正文

  • hexo-enhancer 分类、标签、标题生成插件

    • 安装npm install hexo-deployer-git --save

    • 配置 在_config.yml中配置

      1
      2
      3
      4
      5
      deploy:
      type: git
      repo: <仓库链接> # 可以是 https 链接也可以是 git 链接
      branch: [分支] # GitHub 的网站分支为 gh-pages,其他网站可能有所不同
      message: [message] # 默认是 Site updated: {{ now('YYYY-MM-DD HH:mm:ss') }}
  • hexo-word-counter 字数统计插件

    • 安装npm install hexo-word-counter --save

    • 配置 在_config.yml中配置

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      # hexo-word-counter
      ## https://github.com/next-theme/hexo-word-counter
      symbols_count_time:
      symbols: true
      time: true
      total_symbols: false
      total_time: false
      exclude_codeblock: false
      awl: 4
      wpm: 275
      suffix: "mins."
  • hexo-abbrlink 文章链接修改插件

    • npm install hexo-abbrlink --save

    • 配置 在_config.yml中配置

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      ## https://github.com/rozbo/hexo-abbrlink
      #首先修改 _config.yml 文件中的 permalink 的配置
      permalink: posts/:abbrlink.html
      #再增加以下配置
      abbrlink:
      alg: crc32 # support crc16(default) and crc32
      rep: hex # support dec(default) and hex
      drafts: true # (true)Process draft,(false)Do not process draft. false(default)
      # Generate categories from directory-tree
      # depth: the max_depth of directory-tree you want to generate, should > 0
      auto_category:
      enable: true # true(default)
      depth: 3 # 3(default)
      over_write: false
      auto_title: false # enable auto title, it can auto fill the title by path
      auto_date: false # enable auto date, it can auto fill the date by time today
      force: false # enable force mode, in this mode, the plugin will ignore the cache, and calc the abbrlink for every post even it already had abbrlink.
  • hexo-generator-sitemap 百度收录爬取

    • 安装npm install hexo-generator-sitemap --save

    • 配置 在_config.yml中配置

      1
      2
      3
      4
      5
      6
      7
      8
      # hexo-generator-sitemap
      ## https://github.com/hexojs/hexo-generator-sitemap
      sitemap:
      path: sitemap.xml
      # template: ./sitemap_template.xml
      rel: true
      tags: false
      categories: false
  • hexo-generator-search 搜索插件

    • 安装 npm install hexo-generator-search --save

    • 配置 在_config.yml中配置

      1
      2
      3
      search: 
      path: search.xml;
      field: post;
  • 代码高亮

    • 安装npm i -S hexo-prism-plugin

    • 配置 在_config.yml中配置

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      highlight:
      enable: false
      line_number: true
      auto_detect: false
      tab_replace: false
      wrap: true
      hljs: false

      prism_plugin:
      mode: 'preprocess' # realtime/preprocess
      theme: 'tomorrow'
      line_number: false # default false
      custom_css:

参考链接