Control index.xml for Atom/RSS(hugo / blogdown 生成带有相关链接的提要)

Control index.xml for Atom/RSS (hugo / blogdown generates feed with relative links)

config.toml中的哪些参数或/layouts中的哪些文件控制index.xml的生成?

当我验证我的 Atom 提要时,我收到了一些错误,几乎所有错误都是由于 links 不完整 links。

https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Ftaraskaduk.com%2Findex.xml

示例:

 <title>My first shiny app: calculating your hourly rate as a consultant</title>
 <link>/post/2018-01-shiny-rate/shiny_rate/</link>
 <pubDate>Sat, 13 Jan 2018 00:00:00 +0000</pubDate>

我的理解是需要完整的 link,即 https://taraskaduk.com/post/2018-01-shiny-rate/shiny_rate/

我该如何控制它?

此外,有没有办法将整个 post 传递给 Atom,而不仅仅是描述?

  1. 您需要 config.toml 中的完整 baseURL(参见 blogdown 书中的 Section 2.2);
  2. 我建议您通过 Github 和 Netlify (Section 3.1). Don't use the public/ directory build locally on your computer. Build it on the server side instead. If you must build your site locally, every time before you publish the public/ folder, make sure that you run blogdown::hugo_build() (Section 1.7) 发布您的网站。

关于您的 RSS 提要包含相对 URL 的原因,请参阅 Appendix D.3(简答:baseurl = "/")。