blob: d82efe0c466ef04f4852443877d32689f4a66671 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{{- $items := slice -}}
{{- $sources := slice -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $feeds := partial "function-generate-feeds.html" . -}}
{{- range $author.feeds.rss -}}
{{- $data := split . " " -}}
{{- $url := delimit (first 1 $data) "" -}}
{{- $sources = $sources | append (string $url) -}}
{{- end -}}
{{- $inner := 1 -}}
{{- if eq (len $sources) 1 -}}
{{- $inner = 3 -}}
{{- end -}}
{{- range $source := (first 3 $sources) -}}
{{- range $distinct := first $inner (where $feeds "FeedSourceLink" "eq" $source) -}}
{{- $items = $items | append $distinct -}}
{{- end -}}
{{- end -}}
{{- range (sort $items "FeedDateTime" "desc") -}}
<web-ring-item>
<header>
<a
title="{{ .FeedLink }}"
href="{{ .FeedLink }}">
{{ or .FeedTitle (truncate 50 "..." (or .FeedContentShort .FeedDescriptionShort)) }}
</a>
</header>
<time
title="{{ .FeedDateTitle }}"
datetime="{{ .FeedDateTime }}">
{{ .FeedDate }}
</time>
<p>
{{ "--" | markdownify }}
{{ if gt (len .FeedDescriptionShort) (len .FeedContentShort) -}}
{{ or .FeedDescriptionShort .FeedTitle }}
{{- else -}}
{{ or .FeedContentShort .FeedTitle }}
{{- end }}
—
</p>
<a
title="{{ .FeedSourceDescription }}"
href="{{ or .FeedSourceHome .FeedSourceLink }}">
{{ .FeedSourceTitle }}
</a>
</web-ring-item>
{{- end -}}
|