详情可见:

{% hideBlock 点我预览, blue %}
https://blog.seln.cn/fc
{% endhideBlock %}

本博客的是根据liushen柳清扬大佬的开源项目,修复了bug使用

复刻修改项目

  1. 修改仓库根目录的conf.yaml
YML
spider_settings:
  enable: true
  json_url: "https://你的博客域名/friend.json"
  article_count: 5
  merge_result:
    enable: true
    merge_json_url: "https://你为朋友圈设置的域名"

你可以先填,文件在下文会实现
2. 继续修改conf.yaml

YML
rss_subscribe:
  enable: true
  github_username: willow-god
  github_repo: 朋友圈精简版
  your_blog_url: https://你的博客域名/
  email_template: "./push_templates/default.html"
  website_info:
    title: "你的名字/id"
  1. 点击左上角的main,更换为page
    删除all.json和errors.json里的全部内容,等会抓取链接的时候会自动更新

  2. 创建friend.json文件
    先创建一个朋友圈页面,再在博客根目录创建link.js
    3

  • 创建朋友圈页面
BASH
hexo new page fc #fc你可以更换别的

并在朋友圈的index.md添加如下代码

  • 创建link.js

然后依次执行

BASH
npm i yamljs --save
node link.js
hexo cl;hexo g;hexo d

这样友链数据就出来了。例:你的博客域名/friend.json

  1. Cloudflare Pages部署
    进入cloudflare点击左侧的计算和AI,选择workers和pages,点击创建应用程序,选择pages,导入现有 Git 存储库,选择你要部署的项目3
    生产分支一定要选page,创建完绑定域名就行
  2. 开始运行
    打开github朋友圈仓库,点击上方的action,再点击左侧的Friend circle lite
    4
    点击运行工作流程,等待几分钟就大功告成了

结尾

朋友圈会自动抓取配置了rss的博客,没有配置的博客不会显示
朋友圈底部的订阅:32 活跃:19,意思是你有32个友链,只有19人配置了rss
这下你访问你朋友圈域名或者博客朋友圈的页面就会显示文章了

评论