File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : Codemeta News
3+ layout : single
4+ ---
5+
6+ {{< news >}}
Original file line number Diff line number Diff line change 1+ <h2 class =" ms-3 " >CodeMeta News</h2 >
2+ <ul class =" list-group list-unstyled " >
3+
4+ {{ $items := slice }}
5+
6+ {{ range $feed := .Site.Data.feeds }}
7+ {{ $item := index $feed.channel "item" }}
8+ {{ $items = $items | append $item }}
9+ {{ end }}
10+
11+ {{ $combi := slice }}
12+
13+ {{- range $items -}}
14+ {{ $t := time.AsTime .pubDate }}
15+ {{ $m := dict "link" .link "title" .title "pubDate" $t "description" .description }}
16+ {{ $combi = $combi | append $m }}
17+ {{- end -}}
18+
19+ {{ $combi := sort $combi ".pubDate" "desc" }}
20+
21+ {{ range $combi }}
22+ <li class="ps-2 pb-2">
23+ <h3><a class="list-group-item newslink p-2" href="{{ .link }}">{{ .title }}</a></h3>
24+ <small class="ps-2 text-secondary-emphasis">{{ .pubDate | time.Format "Jan 02, 2006 3:04 PM MST" }}</small>
25+ <div class="ps-2 pt-2">{{ .description }}</div>
26+ </li>
27+ {{ end }}
28+ </ul >
29+ <div class =" text-center " ><small class =" mw-100 text-secondary-emphasis " >Updates daily</small ></div >
You can’t perform that action at this time.
0 commit comments