From 87fd0ad3e9309064fe9fda373035f5ce127ae8d8 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 26 Apr 2020 00:21:47 +0200 Subject: Improved HTML template --- internal/feed/template/feed.tpl.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'internal/feed/template/feed.tpl.go') diff --git a/internal/feed/template/feed.tpl.go b/internal/feed/template/feed.tpl.go index bb49818..8aab9d7 100644 --- a/internal/feed/template/feed.tpl.go +++ b/internal/feed/template/feed.tpl.go @@ -40,14 +40,15 @@ const feedTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feedi -{{with .Item.Description}} +{{with .Item.Content}}
{{html .}} -{{end}} -{{with .Item.Content}} +{{else}} +{{with .Item.Description}}
{{html .}} {{end}} +{{end}} {{with .Item.Enclosures}} @@ -71,6 +72,8 @@ const feedTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feedi
{{template "bottomLine" (dict "descr" "Date:" "content" .Item.Published)}} {{template "bottomLine" (dict "descr" "Author:" "content" .Creator)}} - {{template "bottomLine" (dict "descr" "Subject:" "content" .Item.Title)}} {{template "bottomLine" (dict "descr" "Filed under:" "content" (join ", " .Item.Categories))}} + {{with .Feed.FeedLink}} + {{template "bottomLine" (dict "descr" "Feed-Link:" "content" (print "" . "" | html))}} + {{end}}
` -- cgit v1.2.3-70-g09d2