Browse Source

fixed atom feed

master
jk 4 years ago
parent
commit
48e239ad4c
  1. 6
      themes/hugo-atom-feed/layouts/_default/list.atom.xml

6
themes/hugo-atom-feed/layouts/_default/list.atom.xml

@ -69,10 +69,6 @@
{{- $link := printf "%s?utm_source=atom_feed" .Permalink | safeHTML }}
{{- printf `<link href=%q rel="alternate" type="text/html" hreflang=%q />` $link .Lang | safeHTML }}
{{- end }}
{{/* rel=related: See https://validator.w3.org/feed/docs/atom.html#link */}}
{{- range first 5 (site.RegularPages.Related .) }}
<link href="{{ .Permalink }}?utm_source=atom_feed" rel="related" type="text/html" title="{{ .Title }}" />
{{- end }}
{{ with .Params.id }}
<id>{{ . | plainify }}</id>
{{ else }}
@ -90,7 +86,7 @@
{{ $description1 := .Description | default "" }}
{{ $description := (cond (eq "" $description1) "" (printf "<blockquote>%s</blockquote>" ($description1 | markdownify))) }}
{{ printf `<content type="html"><![CDATA[%s%s]]></content>` $description .Content | safeHTML }}
</entry>
{{ end }}
</feed>