aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-06-02 22:26:37 -0400
committertdro <tdro@noreply.example.com>2022-06-02 22:26:37 -0400
commitb7768b3a19cc292d6ac829f299eb4deefdd809e4 (patch)
treedbfdaf4fd15a61a581432e5b36c3e4b522c40ee2
parent7fdde9da677a73354447df77e513fdea966eaee1 (diff)
downloadcanory-b7768b3a19cc292d6ac829f299eb4deefdd809e4.tar.gz
canory-b7768b3a19cc292d6ac829f299eb4deefdd809e4.tar.bz2
canory-b7768b3a19cc292d6ac829f299eb4deefdd809e4.zip
themes/default/layouts/partials/feeds-generate: Handle item map
-rw-r--r--themes/default/layouts/partials/feeds-generate.html26
1 files changed, 16 insertions, 10 deletions
diff --git a/themes/default/layouts/partials/feeds-generate.html b/themes/default/layouts/partials/feeds-generate.html
index 79a951f..f504f9e 100644
--- a/themes/default/layouts/partials/feeds-generate.html
+++ b/themes/default/layouts/partials/feeds-generate.html
@@ -31,19 +31,25 @@
{{ $sourceLink = index .link 0 -}}
{{ end -}}
+ {{ $sourceTitle = .title -}}
{{ $sourceDescription = .description -}}
- {{ $sourceTitle = .title -}}
- {{ range first $value .item -}}
- {{ $description = .description -}}
- {{ $content = .description -}}
- {{ $title = .title -}}
- {{ $link = .link -}}
- {{ $date = .pubDate -}}
- {{ $dateTime = .pubDate -}}
- {{ $dateTitle = .pubDate -}}
- {{ end -}}
+ {{ if reflect.IsMap .item -}}
+ {{ with .item }}
+ {{ $title = index . "title" }}
+ {{ $link = index . "link" }}
+ {{ $date = index . "pubDate" }}
+ {{ end }}
+ {{ else -}}
+ {{ range first $value .item -}}
+ {{ $description = .description -}}
+ {{ $content = .description -}}
+ {{ $title = .title -}}
+ {{ $link = .link -}}
+ {{ $date = .pubDate -}}
+ {{ end -}}
+ {{ end }}
{{ else -}}