fix RSS en lazyload imgs

This commit is contained in:
Wouter Groeneveld 2021-01-05 15:30:06 +01:00
parent 9c7fcf344d
commit 0dc8335df6
3 changed files with 10 additions and 4 deletions

View File

@ -30,7 +30,7 @@ enableGitInfo = true
[Author]
name = "Wouter Groeneveld"
email = "wouter.groeneveld@gmail.com"
email = "wouter@brainbaking.com"
[markup]

View File

@ -84,7 +84,7 @@ main
max-width: 930px !important
article
text-align: justify
text-align: left
margin-bottom: 1rem
p
margin: 0 0 20px !important

View File

@ -43,13 +43,19 @@
<category>{{ . }}</category>
{{ end }}
{{ end }}
{{ $lazyLoadImg := "<img class=\"lazyload\" data-src=" }}
{{ $eagerLoadImg := "<img src=" }}
{{ $content := .Content | replaceRE $lazyLoadImg $eagerLoadImg | safeHTML }}
<description>
{{ `<![CDATA[ ` | safeHTML }}
{{ if .Params.bigimg }}
<img align="left" hspace="5" src="{{ $baseurl }}bigimg/{{ .Params.bigimg }}"/>
<p>
<img align="left" hspace="5" src="{{ $baseurl }}bigimg/{{ .Params.bigimg }}"/>
</p>
{{ end }}
{{ .Summary | html }}
{{ $content | safeHTML }}
]]>
</description>
</item>