Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8115f0

Browse files
committed
tweak(home): limit featured news to first five items listed in news.yaml
1 parent b2cb785 commit b8115f0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dot-org/assets/news.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@
1313
- title: NGINX Unit v1.34.2 has been released
1414
desc: "[unit-1.34.2](https://unit.nginx.org/) bugfix version has been [released](https://unit.nginx.org/news/2025/unit-1.34.2-released/)."
1515
date: 2025-01-14
16+
- title: NGINX Unit v1.34.2 has been released
17+
desc: "[unit-1.34.2](https://unit.nginx.org/) bugfix version has been [released](https://unit.nginx.org/news/2025/unit-1.34.2-released/)."
18+
date: 2025-01-14
1619

dot-org/layouts/partials/home/featured-news.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h2 class="ngx-section-header">Latest News</h2>
33
<ol class="relative border-s-2 border-black flex gap-8 flex-col">
44
{{ $newsItems := resources.Get "news.yaml" | transform.Unmarshal }}
5-
{{ range $newsItems }}
5+
{{ range first 5 $newsItems }}
66
<li class="ms-4 list-none">
77
<div class="absolute w-3 h-3 bg-ngx-green rounded-full mt-1.5 timeline-decimal-offset"></div>
88
<time class="mb-1 text-sm font-normal leading-none text-gray-700 ">{{ .date }}</time>

0 commit comments

Comments
 (0)