diff --git a/source/_posts/hexo-topic-feeds.md b/source/_posts/hexo-topic-feeds.md new file mode 100644 index 0000000..cf64825 --- /dev/null +++ b/source/_posts/hexo-topic-feeds.md @@ -0,0 +1,30 @@ +--- +title: Rubicon's Rubicon的RSS订阅功能介绍和技术细节 +date: 2021-10-13 18:36:53 +tags: + - Hexo + - RSS +categories: 博客功能更新 +--- + +> RSS(英文全称:RDF Site Summary 或 Really Simple Syndication[2]),中文译作簡易資訊聚合[3],也称聚合内容[4],是一種消息來源格式規範,用以聚合多個網站更新的內容並自動通知網站訂閱者。使用 RSS 後,網站訂閱者便無需再手動查看網站是否有新的內容,同時 RSS 可將多個網站更新的內容進行整合,以摘要的形式呈現,有助於訂閱者快速獲取重要信息,並選擇性地點閱查看。 ———— [RSS - Wikipedia](https://zh.wikipedia.org/wiki/RSS) + +之前花了两天时间完成了这个功能,后来心血来潮在网站上看看时发现有bug。修好bug之后我觉得还是水一篇文章吧,否则博客开了一年都没什么内容。这篇文章主要就是介绍RSS订阅功能以及实现时的一些技术细节,如果想要扒我(包含这个功能)的主题或者借以参考的话,我过一段时间会把这个主题整理开源出来。 + + + +Rubicon's Rubicon同时支持全站订阅和按标签或目录订阅。全站订阅就在每个页面最下方的“Links”里面。 + +{% img /img/hexo-topic-feeds/site-feeds.png "Feed (Atom) 和 Feed (RSS)" %} + +目前为止,对于Rubicon's Rubicon来说RSS和Atom订阅没有差别。 + +## 按标签或目录订阅 + +通过菜单栏里的"Archives"或右边的"Tags"进入任意标签或目录的页面,在标题下面就有“FEED (Atom)”和“FEED (RSS)”。 + +{% img /img/hexo-topic-feeds/topic-feeds.png "标题“诗集”下面有“FEED (Atom)”和“FEED (RSS)”" %} + +## 技术细节 + +Rubicon's Rubicon基于静态博客生成器[Hexo](https://hexo.io)构建,所以当然没法根据参数动态生成订阅文件。不过[hexo-feed](https://github.com/sergeyzwezdin/hexo-feed)这个插件支持按照标签或者目录生成订阅。我做了一些配置,然后在相应的页面引用(拼链接)就可以使用了。 diff --git a/source/img/hexo-topic-feeds/site-feeds.png b/source/img/hexo-topic-feeds/site-feeds.png new file mode 100644 index 0000000..f3a3e16 Binary files /dev/null and b/source/img/hexo-topic-feeds/site-feeds.png differ diff --git a/source/img/hexo-topic-feeds/topic-feeds.png b/source/img/hexo-topic-feeds/topic-feeds.png new file mode 100644 index 0000000..b50269d Binary files /dev/null and b/source/img/hexo-topic-feeds/topic-feeds.png differ