Skip to content

Commit a102873

Browse files
committed
rss image fix
1 parent 0891cf5 commit a102873

File tree

2 files changed

+2
-62
lines changed

2 files changed

+2
-62
lines changed

layouts/_default/rss.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{{ else -}}
3636
{{- $images := .Resources.ByType "image" -}}
3737
{{- $featured := $images.GetMatch "*feature*" -}}
38-
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
38+
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*,*logo*}" }}{{ end -}}
3939
{{- with $featured -}}
4040
<enclosure url="{{ $featured.Permalink }}" type="image/jpg"></enclosure>
4141
{{- else -}}
@@ -48,9 +48,7 @@
4848
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
4949
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
5050
<guid>{{ .Permalink }}</guid>
51-
{{- $content := replaceRE "a href=\"(#.*?)\"" (printf "%s%s%s" "a href=\"" .Permalink "$1\"") .Content -}}
52-
{{- $content = replaceRE "img src=\"(.*?)\"" (printf "%s%s%s" "img src=\"" .Permalink "$1\"") $content -}}
53-
<description>{{ $content | html }}</description>
51+
<description>{{ .Content | html }}</description>
5452
</item>
5553
{{ end }}
5654
</channel>

layouts/rss.xml

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)