Hugo的RSS会让Google产生各种错误提示,所以打算禁用RSS。Hugo禁用RSS方法如下:

修改Hugo.toml文件

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#[outputs]
#  home = ["HTML", "RSS"]
#  page = ["HTML", "MarkDown"]
#  section = ["HTML", "RSS"]
#  taxonomy = ["HTML", "RSS"]
#  taxonomyTerm = ["HTML"]

[outputs]
  home = ["HTML"]
  page = ["HTML"]
  section = ["HTML"]
  taxonomy = ["HTML"]
#  taxonomyTerm = ["HTML"]

如果使用even主题会报错,还需要修改themes/even/layouts/partials/footer.html,去掉

1
2
3
4
5
  {{ if .Site.LanguagePrefix -}}
  <a href="{{ .Site.LanguagePrefix | absURL }}/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
  {{- else -}}
  <a href="{{ .Site.RSSLink }}" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
  {{- end }}