aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-06-14 21:55:52 -0400
committertdro <tdro@noreply.example.com>2022-06-14 21:55:52 -0400
commite11ea41fccb1e43a88340d632815339ab638dc87 (patch)
treeff6475ef37e1f9fa471b5f5e847c4db63d34fd4d
parent98b3e15d6d5a80912170369789a7d3f5720d796e (diff)
downloadcanory-e11ea41fccb1e43a88340d632815339ab638dc87.tar.gz
canory-e11ea41fccb1e43a88340d632815339ab638dc87.tar.bz2
canory-e11ea41fccb1e43a88340d632815339ab638dc87.zip
themes/default/layouts/partials/feeds-generate: Check for mapped subtitles
-rw-r--r--themes/default/layouts/partials/feeds-generate.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/feeds-generate.html b/themes/default/layouts/partials/feeds-generate.html
index c56b865..268e159 100644
--- a/themes/default/layouts/partials/feeds-generate.html
+++ b/themes/default/layouts/partials/feeds-generate.html
@@ -60,12 +60,18 @@
{{- else -}}
- {{- $sourceDescription = .subtitle -}}
-
{{- with .link -}}
{{- $sourceLink = index (index . 0) "-href" -}}
{{- end -}}
+ {{- with .subtitle -}}
+ {{- if reflect.IsMap . -}}
+ {{- $sourceDescription = index . "#text" -}}
+ {{- else -}}
+ {{- $sourceDescription = . -}}
+ {{- end -}}
+ {{- end -}}
+
{{- with .title -}}
{{- if reflect.IsMap . -}}
{{- $sourceTitle = index . "#text" -}}
@@ -95,7 +101,7 @@
{{- $title = index . "#text" -}}
{{- else -}}
{{- $title = . -}}
- {{ end -}}
+ {{- end -}}
{{- end -}}
{{- with .content -}}