18

一分钟使用GitHub搭建"Bubo Reader"RSS订阅器

 2 years ago
source link: https://xiamuyourenzhang.cn/post/232
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

一分钟使用GitHub搭建"Bubo Reader"RSS订阅器

by 叶开楗 · 2021-10-14 · 0 次阅读

ps:不看前言的可以直接跳到安装教程步骤。

事情是这样的,昨天的miniblog 在分页伪静态一直搞不定虽然“凡哥”在昨天凌晨12点帮我搞定了但还是发生了其他问题,我苦恼到凌晨2点多才下线睡觉。

最重我还是决定不折腾了换个博客程序看看吧,于是今天又换了一款还是无数据库静态博客 "Bludit"程序我在本地安装运行,结果又遇到搜索不了中文问题,纠结了很久我还是到github issue 发了个反馈,我又根据搜索插件的代码里面留下的作者链接去访问了插件作者博客。

然后我看到了作者两天前发布的文章“《A minimal RSS Feed Reader》”里面主要吐槽了说之前的一些RSS订阅器xx的,然后总结他认为自己认为的rss订阅器是怎么样的,建议查看原文英语不好的同学可以和我一样用谷歌翻译。

看完通篇文章之后他留下了一个RSS阅读器地址和Github项目地址,我点击链接查看之后发现这不是我心心念念的阅读器吗!!!简单,简洁,方便阅读,绝绝子啊!!

.....

在项目地址https://github.com/kevinfiol/reader 看了一圈之后我发现没有安装教程,原来作者也是fork 修改的,需要让我去之前的原项目 查看安装教程。

我又去看了原项目 github项目地址https://github.com/georgemandis/bubo-rss 更懵逼了什么鬼呀!!无奈上面一直都是教你如何安装到一些能挂载github项目的平台等,我只想搭建到我自己的服务器地址上面。

为此我找到了最开始二开这个项目博客作者的邮箱地址,我给他发了一封邮件如下:

I read your article: https://kevinfiol.com/blog/a-minimal-rss-feed-reader/ I like this RSS reader too much, but can https://github.com/kevinfiol/reader Install on the VPS and use it!

I have a server and I don’t need additional use. I would like to know your answer if I can! I apologize for disturbing you late at night. It is daytime in China.

没想才几分钟就收到作者邮件回复了,如下:

Hello!

Do not worry, I am awake too. :)

Yes, you can easily host this on a VPS since the reader is deployed as a static site (only HTML and CSS). You would just need to set up some sort of cron job to run the src/build.js script at an interval of your choice.

For my example, I am deploying to Github Pages using Github Actions. You can see the Github Actions Workflow in the .github/workflows directory of my repository. You can take this route as well -- there would be no need for a VPS if you do it like this.

I hope this answers your question. Good luck!

Kevin

我顿时一个卧槽,这么简单啊是我想复杂了,于是我去搭建了一下真就花了一分钟 我搭建好了如下:

地址:https://xiamuguizhi.github.io/

访问 https://github.com/kevinfiol/reader 项目Fork 到你自己的仓库。

如果已经有小伙伴在使用github搭建博客或者站点的话可以跳过第二步直接进行第三步操作。

fork 的项目点击设置进行改名字,格式为:github用户名.github.io 比如我自己:xiamuguizhi.github.io 这样你就可以访问域名github用户名.github.io 看到这个页面了。

ps:直接跳到第三步的小伙伴,可以访问:github用户名.github.io/reader/ 进行访问。

这时候我们点击Actions 动作点击启用作者为我们写好的自动更新RSS订阅脚本就可以了,作者默认设置三十分钟 执行一次脚本,当然你门可以编辑github_pages.yml 修改时间多久更新一次。

  • 点击进入src
  • 点击feeds.json 文件进入,在点击右上角 进行编辑

然后就算对内容进行编辑了,你们可以参考我的,如下:

{
  "日常生活": [
    "https://xiamuyourenzhang.cn/feed.xml",
    "https://www.linyufan.com/rss.xml",
    "http://gojira.net/feed"
  ],
  "技术博客": [
    "https://zezeshe.com/feed"
  ],
  "blogs": [
    "https://kevinfiol.com/atom.xml"
  ]
}

ps: 切记最后一个不需要带, 逗号

最后就是提交保存更新,更新说明随便打什么字都可以,点击绿色按钮Commit changes 就能保存更新了。

还记得我们前面第三步设置的自动执行更新脚本吗?除了默认半小时更新一小时外,我们更新一次源文件也能触发一次脚本执行效果,下面我保存提交看看效果吧。

.....

你们看已经在自动更新订阅源了,下面只需要耐心等待博客源更新完毕,然后打开 github用户名.github.io 或者github用户名.github.io/reader/ 查看你的RSS订阅器吧!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK