Allow HTML in some Atom fields

master
Will Faught 4 months ago
parent 608637ff88
commit ac2dd7f24a

@ -2,7 +2,7 @@
{{ $authors := $page.Param "paige.feeds.atom.authors" }} {{ $authors := $page.Param "paige.feeds.atom.authors" }}
{{ $date := "2006-01-02T15:04:05Z07:00" }} {{ $date := "2006-01-02T15:04:05Z07:00" }}
{{ $description := cond $page.IsHome ($page.Param "paige.site.description") $page.Description | markdownify | plainify | htmlUnescape }} {{ $description := cond $page.IsHome ($page.Param "paige.site.description") $page.Description | markdownify }}
{{ $icon := $page.Param "paige.feeds.atom.icon" | absLangURL }} {{ $icon := $page.Param "paige.feeds.atom.icon" | absLangURL }}
{{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }} {{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }}
{{ $language := site.LanguageCode }} {{ $language := site.LanguageCode }}
@ -20,17 +20,17 @@
{{ $titles := slice }} {{ $titles := slice }}
{{ if $page.IsHome }} {{ if $page.IsHome }}
{{ $titles = slice (site.Title | default $page.Title | markdownify | plainify | htmlUnescape) }} {{ $titles = slice (site.Title | default $page.Title | markdownify) }}
{{ else }} {{ else }}
{{ with $page.Title }} {{ with $page.Title }}
{{ $titles = slice (. | markdownify | plainify | htmlUnescape) }} {{ $titles = slice (markdownify .) }}
{{ end }} {{ end }}
{{ range .Ancestors }} {{ range .Ancestors }}
{{ $title := cond .IsHome (site.Title | default .Title) .Title }} {{ $title := cond .IsHome (site.Title | default .Title) .Title | markdownify }}
{{ with $title }} {{ with $title }}
{{ $titles = $titles | append (. | markdownify | plainify | htmlUnescape) }} {{ $titles = append . $titles }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@ -114,7 +114,7 @@
{{ $id := cond ($subpage.Params.id | not) $subpage.RelPermalink $subpage.Params.id }} {{ $id := cond ($subpage.Params.id | not) $subpage.RelPermalink $subpage.Params.id }}
{{ $lastmod := $subpage.Lastmod.Format $date }} {{ $lastmod := $subpage.Lastmod.Format $date }}
{{ $published := $subpage.PublishDate.Format $date }} {{ $published := $subpage.PublishDate.Format $date }}
{{ $title := $subpage.Title | markdownify | plainify | htmlUnescape }} {{ $title := markdownify $subpage.Title }}
{{ $link := cond $external $subpage.Params.link $subpage.Permalink }} {{ $link := cond $external $subpage.Params.link $subpage.Permalink }}

Loading…
Cancel
Save