控制 index.xml 为 Atom/RSS 生成有效的 RSS 提要(无相关链接) [英] Control index.xml for Atom/RSS to generate valid rss feed (without relative links)

查看:47
本文介绍了控制 index.xml 为 Atom/RSS 生成有效的 RSS 提要(无相关链接)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任务:我想向我的网站添加 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])

设置:

问题和验证:

  1. 根据这个视频https://www.youtube.com/watch?v=gF0tohv99Ow我的博客 rss 应该是这个http://www.malte-grosser.com/index.xml

  1. 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

    我保留的唯一部分是 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆