<image><link> in RSS should link to the permalink

RSS specification says: <https://www.rssboard.org/rss-specification#ltimagegtSubelementOfLtchannelgt>

> <link> is the URL of the site, when the channel is rendered, the image is a link to the site. (Note, in practice the image <title> and <link> should have the same value as the channel's <title> and <link>.

Practically, some RSS readers may produce clicable images that leads to
homepage. Linking an image to the image itself doesn't make much sense.
This commit is contained in:
Hong Xu 2024-06-26 13:45:01 -07:00
parent 9ea3bb0e1f
commit 1adf1ca508
1 changed files with 3 additions and 3 deletions

View File

@ -48,11 +48,11 @@
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</description>
{{- with site.Params.images }}
{{- if site.Params.images }}
<image>
<title>{{ site.Title }}</title>
<url>{{ index . 0 | absURL }}</url>
<link>{{ index . 0 | absURL }}</link>
<url>{{ index site.Params.images 0 | absURL }}</url>
<link>{{ .Permalink }}</link>
</image>
{{- end }}
<generator>Hugo -- {{ hugo.Version }}</generator>