fix RSS en lazyload imgs
This commit is contained in:
parent
0241d352b3
commit
6e8fa7ad70
|
@ -11,7 +11,7 @@ summaryLength = 20
|
|||
|
||||
[Author]
|
||||
name = "Wouter Groeneveld"
|
||||
email = "wouter.groeneveld@gmail.com"
|
||||
email = "wouter@brainbaking.com"
|
||||
|
||||
[markup]
|
||||
defaultMarkdownHandler = "goldmark"
|
||||
|
|
|
@ -199,7 +199,7 @@ article
|
|||
background-image: none
|
||||
|
||||
p, li
|
||||
text-align: justify !important
|
||||
text-align: left !important
|
||||
|
||||
|
||||
.no-border
|
||||
|
|
|
@ -43,10 +43,18 @@
|
|||
<category>{{ . }}</category>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $lazyLoadImg := "data-src=" }}
|
||||
{{ $eagerLoadImg := "src=" }}
|
||||
{{ $content := .Content | replaceRE $lazyLoadImg $eagerLoadImg | safeHTML }}
|
||||
<description>
|
||||
{{ `<![CDATA[ ` | safeHTML }}<img align="left" hspace="5" src="{{ $baseurl }}{{ .Params.image }}"/>
|
||||
{{ `<![CDATA[ ` | safeHTML }}
|
||||
{{ if .Params.image }}
|
||||
<p>
|
||||
<img hspace="5" src="{{ $baseurl }}{{ .Params.image }}"/>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ .Summary | html }}
|
||||
{{ $content | safeHTML }}
|
||||
]]>
|
||||
</description>
|
||||
</item>
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
<html>
|
||||
<head>
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="Jefklak's Codex" />
|
||||
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="Jefklak's Codex" />
|
||||
{{ end }}
|
||||
|
||||
{{ range .Site.Params.navlinks }}
|
||||
{{ if .home }}
|
||||
<meta http-equiv="refresh" content="0; URL={{ .url | absURL }}" />
|
||||
{{ if .home }}
|
||||
<meta http-equiv="refresh" content="0; URL={{ .url | absURL }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</head>
|
||||
</head>
|
||||
</html>
|
Loading…
Reference in New Issue