aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--themes/default/layouts/partials/function-generate-feeds.html10
1 files changed, 7 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/function-generate-feeds.html b/themes/default/layouts/partials/function-generate-feeds.html
index 547a7e3..545e1b8 100644
--- a/themes/default/layouts/partials/function-generate-feeds.html
+++ b/themes/default/layouts/partials/function-generate-feeds.html
@@ -6,13 +6,17 @@
{{- range $key, $value := (seq 3) -}}
{{- range $author.feeds.rss -}}
- {{- with resources.GetRemote . -}}
+ {{- $data := split . " " -}}
+ {{- $url := delimit (first 1 $data) "" -}}
+ {{- $retitle := delimit (after 1 $data) " " -}}
+
+ {{- with resources.GetRemote $url -}}
{{- with .Err -}}
{{- warnf "Feed fetch %s" . -}}
{{- end -}}
{{- end -}}
- {{- with resources.GetRemote . | transform.Unmarshal -}}
+ {{- with resources.GetRemote $url | transform.Unmarshal -}}
{{- $content := "" -}}
{{- $date := now.Format "2006-01-02T15:04:05Z" -}}
@@ -172,7 +176,7 @@
"FeedEnclosure" ($enclosure | plainify | html | htmlUnescape)
"FeedImageLink" ($imageLink | plainify | html | htmlUnescape)
"FeedLink" ($link | plainify | html | htmlUnescape)
- "FeedName" (delimit ((delimit (first 2 (split ($sourceTitle | plainify | html | htmlUnescape) " ")) " ") | findRE "^([^.|?|!|\n|\"|]+)") " " | replaceRE "[^a-zA-Z ]" "")
+ "FeedName" (or $retitle (delimit (first 2 (split ($sourceTitle | plainify | html | htmlUnescape) " ")) " "))
"FeedSourceDescription" ($sourceDescription | plainify | html | htmlUnescape)
"FeedSourceDomain" ($sourceDomain | plainify | html | htmlUnescape)
"FeedSourceLink" ($sourceLink | plainify | html | htmlUnescape)