|
1 | 1 | <div id="newslinks" class="container pt-2"> |
2 | | - <h3 class="ms-3">News</h3> |
3 | | - <ul class="list-group list-unstyled"> |
4 | | - <li><a class="list-group-item newslink lh-base p-2" href="https://www.softwareheritage.org/2025/06/18/codemetar-author-streamlines-software-metadata-updates/">CodemetaR Author streamlines software metadata updates</a></li> |
5 | | - <li><a class="list-group-item newslink lh-base p-2" href="https://www.softwareheritage.org/2025/05/07/software-heritage-citation-feature/">Software Heritage Citation Feature: Addressing researcher needs</a></li> |
6 | | - <li><a class="list-group-item newslink lh-base p-2" href="https://www.softwareheritage.org/2025/04/02/ospo-radar-project-launch/">The OSPO-RADAR Project: Making research software easier to find and use</a></li> |
7 | | - <li><a class="list-group-item newslink lh-base p-2" href="https://www.softwareheritage.org/2024/08/30/codemeta-new-features/">New Features in the CodeMeta Generator</a></li> |
8 | | - <li><a class="list-group-item newslink lh-base p-2" href="https://www.softwareheritage.org/2023/08/24/archival-of-software-metadata/">Deep Dive into the archival of Software Metadata</a></li> |
9 | | - <li><a class="list-group-item newslink lh-base p-2" href="https://www.softwareheritage.org/2020/03/18/codemeta-community/">Software Heritage contributes CodeMeta generator to the community</a></li> |
10 | | - <li><a class="list-group-item newslink lh-base p-2" href="https://www.softwareheritage.org/2019/05/28/mining-software-metadata-for-80-m-projects-and-even-more/">Mining software metadata for 80 M projects and even more</a></li> |
11 | | - </ul> |
| 2 | + <h3 class="ms-3">News</h3> |
| 3 | + <ul class="list-group list-unstyled"> |
| 4 | + {{ if .IsHome }} |
| 5 | + |
| 6 | +{{ $items := slice }} |
| 7 | + |
| 8 | +{{ range $feed := .Site.Data.feeds }} |
| 9 | +{{ $item := index $feed.channel "item" }} |
| 10 | +{{ $items = $items | append $item }} |
| 11 | +{{ end }} |
| 12 | + |
| 13 | +{{ $combi := slice }} |
| 14 | + |
| 15 | +{{- range $items -}} |
| 16 | +{{ $t := time.AsTime .pubDate }} |
| 17 | +{{ $m := dict "link" .link "title" .title "pubDate" $t "description" .description }} |
| 18 | +{{ $combi = $combi | append $m }} |
| 19 | +{{- end -}} |
| 20 | + |
| 21 | +{{ $combi := sort $combi ".pubDate" "desc" }} |
| 22 | + |
| 23 | + {{ range first .Site.Params.newslimit $combi }} |
| 24 | + |
| 25 | + <li class="ps-2"> |
| 26 | + <a class="list-group-item newslink lh-base p-2" href="{{ .link }}">{{ .title }}</a> |
| 27 | + <small class="p-2 text-secondary-emphasis">{{ .pubDate | time.Format "Jan 02, 2006 3:04 PM MST" }}</small> |
| 28 | + </li> |
| 29 | + {{ end }} |
| 30 | + {{ else }} |
| 31 | + {{ range $combi }} |
| 32 | + <li class="ps-2"> |
| 33 | + <a class="list-group-item newslink lh-base p-2" href="{{ .link }}">{{ .title }}</a> |
| 34 | + <small class="p-2 text-secondary-emphasis">{{ .pubDate | time.Format "Jan 02, 2006 3:04 PM MST" }}</small> |
| 35 | + </li> |
| 36 | + {{ end }} |
| 37 | + {{ end }} |
| 38 | + </ul> |
| 39 | + {{ if .IsHome }}<div class="text-center"><small class="mw-100 text-secondary-emphasis">Updates daily<br><a href="/news">Full news feed</a></small></div>{{ end }} |
12 | 40 | </div> |
0 commit comments