forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
3f0ab2285f
commit
72ff357ad5
|
@ -6,9 +6,6 @@
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $pages = $pctx.Pages -}}
|
{{- $pages = $pctx.Pages -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if eq .Section "news" -}}
|
|
||||||
{{- $pages = where .Site.RegularPages "Type" "in" site.Params.mainSections -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||||
{{- if ge $limit 1 -}}
|
{{- if ge $limit 1 -}}
|
||||||
{{- $pages = $pages | first $limit -}}
|
{{- $pages = $pages | first $limit -}}
|
||||||
|
@ -59,14 +56,14 @@
|
||||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||||
<guid>{{ .Permalink }}-{{ $hash }}</guid>
|
<guid>{{ .Permalink }}-{{ $hash }}</guid>
|
||||||
<description>
|
<description>
|
||||||
{{ if $when }}{{ printf "<![CDATA[<p><b>%s</b></p>]]>" $when | safeHTML }}{{ end }}
|
{{- if $when -}}{{- $when | plainify -}}{{- end -}}
|
||||||
|
{{- $c := .Content | plainify -}}
|
||||||
{{ printf "<![CDATA[%s]]>" .Content | plainify }}
|
{{- if $when -}}{{- $c = printf "<p>%s</p>%s" $when $c -}}{{- end -}}
|
||||||
{{ $img := index (.Resources.ByType "image") 0 }}
|
{{- $img := index (.Resources.ByType "image") 0 -}}
|
||||||
{{ with $img }}
|
{{- with $img -}}
|
||||||
{{ $img := .Resize "640x" }}
|
{{- $img := .Resize "640x" -}}
|
||||||
{{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }}
|
{{- printf "<![CDATA[%s<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $c $img.Permalink $img.Width $img.Height | safeHTML -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in New Issue