Skip to content
本页目录

post

post 用于设置文章内容页的文章字数统计阅读时长作者标识版权信息分享功能打赏功能 等。

yaml
post:
  author_label:
    enable: true       # Option values: true | false
    auto: true    # Option values: true | false
    custom_label_list: ["Trainee", "Engineer", "Architect"]

  word_count:
    wordcount: false     # Word count, one article. Option values: true | false
    min2read: false      # Time to read, one article. Option values: true | false

  datetime_format: "YYYY-MM-DD HH:mm:ss"  # Datetime format. e.g. "YYYY-MM-DD HH:mm:ss"

  copyright_info: false  # Option values: true | false

  share: false           # Option values: true | false

  reward:
    enable: false        # Option values: true | false
    img_link:            # Image link for the payment QR code
    text:                # Custom reward text, Can be null

author_label

author_label 设置文章内容页的作者标识(称号),目前有两种方案:

  1. auto 自动设置

    自动生成 Lv1Lv2Lv3 ...... 判断依据为已发布的文章数量,Lv 级别越高,增长越慢。

    yaml
    author_label:
       enable: true
       auto: true

    image

  2. custom_label_list 手动设置

    自定义配置作者标识列表,数组项可以 一个多个,匹配的依据是按文章数量。

    自定义配置需要设置 auto: false

    • 只配置一个的作者标识 不管文章数量多少,将一直显示这个数组项的标识。

      yaml
      # 示例
      auto: false
      custom_label_list: ["前端鼓励师"]

      image

    • 配置多个的作者标识
      根据你的发布的文章数量,自动匹配作者标识。

      yaml
      auto: false
      
      # 示例 1
      custom_label_list: `["实习生", "工程师", "架构师"]`
      
      # 示例 2
      custom_label_list: `["炼气", "筑基", "结丹", "元婴", "化神"]`

      image

      image

word_count

word_count 用于实现 文章字数统计计算阅读时长,启用前需在 Hexo 项目根目录下安装第三方依赖 hexo-wordcount

sh
cd your-hexo
npm install hexo-wordcount

wordcount

wordcount 显示文章字数统计,可选值:truefalse

yaml
word_count:
  wordcount: true

image

min2read

min2read 显示文章阅读时长,可选值:truefalse

yaml
word_count:
  min2read: true

image

datetime_format v3.7.2

datetime_format 用于设置文章创建时间和更新时间的显示格式,默认为 YYYY-MM-DD HH:mm:ss

image

示例:

yaml
datetime_format: "YYYY年MM月DD日 HH:mm"

image

copyright_info 用于在文章末尾开启 文章版权信息,可选值:truefalse

yaml
copyright_info: true

image

share v3.8.0

share 是 Keep 主题 3.8.0 版本新增的配置项,用于在文章末尾开启 文章分享 功能,可选值:truefalse

yaml
share: true

image

目前仅支持将文章快捷分享到 QQ、微信、微博,后续版本支持分享到 X-推特、Facebook 等。

reward v3.8.0

reward 是 Keep 主题 3.8.0 版本新增的 打赏作者 功能。

enable

enable 用于在文章末尾开启 打赏作者 功能,可选值:truefalse

image

enable 用于配置打赏作者的收款码图片,可填写 本地图片路径图片链接

yaml
# 本地图片路径
img_link: /images/reward.png

# 图片链接
img_link: https://cdn.statically.io/gh/XPoet/image-hosting@master/FE-Cheerleaders/play-tour.png

image

text

enable 用于配置打赏作者按钮的悬浮提示词,可以为空,不填将使用 Keep 主题内置提示词。

image

Released under the AGPL-3.0 License