控制 index.xml 为 Atom/RSS 生成有效的 RSS 提要(无相关链接) [英] Control index.xml for Atom/RSS to generate valid rss feed (without relative links)
问题描述
任务:我想向我的网站添加 RSS 提要.(稍后我想为特定类别添加一个单独的 RSS 提要 [对于 R 博主])
Task: I want to add an RSS feed to my site. (Later I want to add a separate RSS feed for a specific category [for R Bloggers])
设置:
- 我使用 Hugo Academic 模板
- 通过 R blogdown 包
- 将我的源代码推送到 githubhttps://github.com/Tazinho/AlmostRandom
- 从哪里通过 netlify 发布http://www.malte-grosser.com/
- 在此处添加了示例博文http://www.malte-grosser.com/post/test-post/
问题和验证:
根据这个视频https://www.youtube.com/watch?v=gF0tohv99Ow我的博客 rss 应该是这个http://www.malte-grosser.com/index.xml
According to this video https://www.youtube.com/watch?v=gF0tohv99Ow my blogs rss should be this http://www.malte-grosser.com/index.xml
根据一些验证器端http://www.feedvalidator.org/我的 RSS 提要似乎无效并且有多种错误http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.malte-grosser.com%2Findex.xml例如:第 5 行,第 11 列:链接必须是完整且有效的 URL:/[help]
According to some validator side http://www.feedvalidator.org/ My rss feed seems not to be valid and has several kinds of errors http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.malte-grosser.com%2Findex.xml eg: line 5, column 11: link must be a full and valid URL: / [help]
目前解决此问题的步骤:
- 我尽可能地关注了一些 SO 帖子.例如这个相关的
我将 rss.xml 添加到/post/layouts/并根据
I added rss.xml to /post/layouts/ and modified it according to
- https://coolbutuseless.bitbucket.io/2018/02/07/blogdown-rss-feed-of-full-articles/
- 我对下面的部分有点挣扎# 引用您的 RSS 提要".我不知道究竟要做什么
- 我阅读了其他几篇文章,并试图从 rbind.io 中找到类似的公共存储库.
- 我删除了大部分试验,以便为进一步试验进行干净的设置
我保留的唯一部分是 config.toml 中的以下更改
the only parts I kept are the following changes within config.toml
- baseurl = "http://malte-grosser.com/"
- rssLimit = 10
[输出]home = [ "HTML", "CSS", "RSS" ]部分 = [HTML",RSS"]分类法 = [ "HTML", "RSS" ]taxonomyTerm = [ "HTML", "RSS" ]
和/post/layouts/下的rss.xml
and the rss.xml under /post/layouts/
推荐答案
根据我的理解(再次阅读 Atom/RSS 的控制 index.xml(hugo/blogdown 生成带有相对链接的提要))似乎可以拥有这些一些错误.
From my understanding (after reading once more Control index.xml for Atom/RSS (hugo / blogdown generates feed with relative links)) it seems to be ok to have these kind of errors.
也适用于有类似问题的任何人:事实证明,博客 RSS 应位于 http://www.malte-grosser.com/post/index.xml,RSS 的类别应该在 http://www.malte-grosser.com/categories/R-bloggers/index.xml
Also for anyone with similar problems: It turns out that the blogs RSS should be under http://www.malte-grosser.com/post/index.xml and the categories RSS's should be under http://www.malte-grosser.com/categories/R-bloggers/index.xml
这篇关于控制 index.xml 为 Atom/RSS 生成有效的 RSS 提要(无相关链接)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!