diff options
| author | tdro <tdro@noreply.example.com> | 2022-06-06 00:07:44 -0400 |
|---|---|---|
| committer | tdro <tdro@noreply.example.com> | 2022-06-06 00:07:44 -0400 |
| commit | 84198d30f618c37a4c2b623ec5a0d76dfdcb595a (patch) | |
| tree | 0ed35ef1cb4b88128ee49ec9ecd448f6c9780431 | |
| parent | 072e4b11561b66925ebabec7eb6c1d07c7a76170 (diff) | |
| download | canory-84198d30f618c37a4c2b623ec5a0d76dfdcb595a.tar.gz canory-84198d30f618c37a4c2b623ec5a0d76dfdcb595a.tar.bz2 canory-84198d30f618c37a4c2b623ec5a0d76dfdcb595a.zip | |
themes/default/layouts/partials/feeds-generate: Wrap entry and item
| -rw-r--r-- | themes/default/layouts/partials/feeds-generate.html | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/themes/default/layouts/partials/feeds-generate.html b/themes/default/layouts/partials/feeds-generate.html index 6617bd0..cd93449 100644 --- a/themes/default/layouts/partials/feeds-generate.html +++ b/themes/default/layouts/partials/feeds-generate.html @@ -26,6 +26,9 @@ {{ with .channel -}} + {{ $sourceTitle = .title -}} + {{ $sourceDescription = .description -}} + {{ if reflect.IsSlice .link -}} {{ if reflect.IsMap (index .link 0) -}} {{ $sourceLink = index (index .link 0) "-href" -}} @@ -36,54 +39,51 @@ {{ $sourceLink = .link -}} {{ end }} - {{ $sourceTitle = .title -}} - {{ $sourceDescription = .description -}} - - {{ if reflect.IsMap .item -}} - {{ with .item }} - {{ $title = index . "title" }} - {{ $link = index . "link" }} - {{ $date = index . "pubDate" }} + {{ with .item }} + {{ if reflect.IsMap . -}} + {{ $title = index . "title" }} + {{ $link = index . "link" }} + {{ $date = index . "pubDate" }} + {{ else -}} + {{ range first $value . -}} + {{ $description = .description -}} + {{ $content = .description -}} + {{ $title = .title -}} + {{ $link = .link -}} + {{ $date = .pubDate -}} + {{ with .enclosure }} + {{ $enclosure = index . "-url" -}} + {{ end }} + {{ end -}} {{ end }} - {{ else -}} - {{ range first $value .item -}} - {{ $description = .description -}} - {{ $content = .description -}} - {{ $title = .title -}} - {{ $link = .link -}} - {{ $date = .pubDate -}} - {{ with .enclosure }} - {{ $enclosure = index . "-url" -}} - {{ end }} - {{ end -}} {{ end }} {{ else -}} - {{ $sourceLink = index (index .link 0) "-href" -}} {{ $sourceTitle = .title -}} {{ $sourceDescription = .subtitle -}} - {{ range first $value .entry -}} + {{ with .link }} + {{ $sourceLink = index (index . 0) "-href" -}} + {{ end }} - {{ if reflect.IsMap .title -}} + {{ with .entry }} + {{ range first $value . -}} + {{ $link = .id -}} + {{ $date = .updated -}} {{ $title = index .title "#text" -}} - {{ else -}} - {{ $title = .title -}} - {{ end -}} - - {{ $date = .updated -}} - {{ $link = .id -}} {{ with .content -}} - {{ $description = index . "#text" -}} {{ $content = index . "#text" -}} + {{ $description = index . "#text" -}} {{ end -}} + {{ with .summary -}} - {{ $description = index . "#text" -}} {{ $content = index . "#text" -}} + {{ $description = index . "#text" -}} {{ end -}} {{ end -}} + {{ end }} {{ end -}} |
