fix Feedly images displayed twice in RSS
This commit is contained in:
parent
f294ab4707
commit
12be2c8bb7
|
@ -1,8 +1,6 @@
|
||||||
<figure>
|
<figure>
|
||||||
<a href="{{ .Destination | safeURL }}" class="lbox">
|
<a href="{{ .Destination | safeURL }}" class="lbox">
|
||||||
<noscript>
|
<noscript class="noscript-lazyload"><img src="{{ .Destination | safeURL }}" {{ with .Text }} alt="{{ . }}"{{ end }} {{ with .Title}} title="{{ . }}"{{ end }}></noscript>
|
||||||
<img src="{{ .Destination | safeURL }}" {{ with .Text }} alt="{{ . }}"{{ end }} {{ with .Title}} title="{{ . }}"{{ end }}>
|
|
||||||
</noscript>
|
|
||||||
<img class="lazyload img-responsive" data-src="{{ .Destination | safeURL }}" {{ with .Text }} alt="{{ . }}"{{ end }} {{ with .Title}} title="{{ . }}" alt="{{ . }}"{{ end }}>
|
<img class="lazyload img-responsive" data-src="{{ .Destination | safeURL }}" {{ with .Text }} alt="{{ . }}"{{ end }} {{ with .Title}} title="{{ . }}" alt="{{ . }}"{{ end }}>
|
||||||
</a>
|
</a>
|
||||||
{{ with .Title }}
|
{{ with .Title }}
|
||||||
|
|
|
@ -45,7 +45,10 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $lazyLoadImg := "data-src=" }}
|
{{ $lazyLoadImg := "data-src=" }}
|
||||||
{{ $eagerLoadImg := "src=" }}
|
{{ $eagerLoadImg := "src=" }}
|
||||||
{{ $content := .Content | replaceRE $lazyLoadImg $eagerLoadImg | safeHTML }}
|
{{ $contentImg := .Content | replaceRE $lazyLoadImg $eagerLoadImg | safeHTML }}
|
||||||
|
|
||||||
|
{{ $noscriptImg := "<noscript class=\"noscript-lazyload\">(.*)</noscript>" }}
|
||||||
|
{{ $content := $contentImg | replaceRE $noscriptImg "" | safeHTML }}
|
||||||
<description>
|
<description>
|
||||||
{{ `<![CDATA[ ` | safeHTML }}
|
{{ `<![CDATA[ ` | safeHTML }}
|
||||||
{{ if .Params.image }}
|
{{ if .Params.image }}
|
||||||
|
|
Loading…
Reference in New Issue