hexo-reader

1.1.1 • Public • Published

hexo-reader

  1. hexo博客的RSS阅读器
  2. 整站文章克隆器,默认支持克隆主题butterfly的博客

安装

npm install hexo-reader -D

指令

配置好后使用唯一指令生成、克隆

  • hexo reader

配置

  • 博客配置文件_config.yml
# reader:生成订阅/克隆网站
reader:
  rss:
    enable: true # 是否开启订阅功能,默认启用
    # 配置文件地址,支持本地文件 和 url
    # path: source/_data/rss.yml # 指定本地文件(如果未指定配置文件路径,默认读取这个文件)
    path: https://cdn.jsdelivr.net/gh/cxvh/cxvh@main/yml/rss.yml # 配置 url
  menu: # 非必须,以下为默认,会自动生成菜单,配置好后需要改下主题的导航;或者手动配置导航菜单
    path: source/_data/menu.yml # 标题文件地址
    icon: icon # 指定图标 name
    name: name # 指定标题 name
    url: url # 指定链接 name
  clone: # 克隆配置
    enable: false # 是否开启克隆功能,默认禁用
    # path: source/_data/clone.yml
    path: https://cdn.jsdelivr.net/gh/cxvh/cxvh@main/yml/clone.yml
  • 订阅配置文件source/_data/rss.yml
- name: 图片 # 菜单名称
  categories: picture # 菜单英文
  class: fas fa-puzzle-piece fa-fw # 菜单图标 class
  list:
    - 百度趣画: https://rsshub.app/baidu/doodles
    - Google 相册: https://rsshub.app/google/album/msFFnAzKmQmWj76EA
    - CNU视觉联盟: https://rsshub.app/cnu/selected
    - NASA每日一天文圖: https://rsshub.app/nasa/apod-cn
- name: 设计
  categories: picture
  class: fas fa-magic fa-fw
  list:
    # 列表第一个没有标题直接链接,后面的风格需要保持一致
    - https://rsshub.app/uisdc/zt/design-history
    - https://rsshub.app/ui-cn/article
  • 克隆配置文件source/_data/clone.yml
- name: BARAN的小站🔥🔥🔥
  host: https://cxvh.com # host 是必须的,入口文件
  output: Baran/ # 输出目录,非必须
  waittime: 0 # 链接请求间隔,默认 500,设置 0 无间隔容易出错
  rule: # 规则非必须,以下为默认规则
    content: $('#article-container') # 文章内容
    title: $('[property="og:title"]').attr('content') # 标题
    auther: $('[name="author"]').attr('content') # 作者
    subtitle: $('[name="description"]').attr('content') # 描述
    pubDate: $('[datetime].post-meta-date-created').attr('datetime') # 发布时间
    tags: $('.post-meta__tag-list a') # 标签
    categories: $('.post-meta-categories a') # 分类
    cover: $('[property="og:image"]').attr('content') # 封面
- name: butterfly主题
  host: https://butterfly.js.org
  output: butterfly/
  waittime: 500 # 等待时间 + 等待时间 × 随机数(0-1)

参考

打赏

您的支持是我持续更新的动力!

微信

支付宝

Package Sidebar

Install

npm i hexo-reader

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

30.1 kB

Total Files

9

Last publish

Collaborators

  • cxvhweb