aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Carlavilla Delgado <carlavilla@FreeBSD.org>2021-05-16 10:32:57 +0000
committerSergio Carlavilla Delgado <carlavilla@FreeBSD.org>2021-05-16 10:32:57 +0000
commita1968cbbedb7b3ac7dab38edaa28fc3eb3dec24e (patch)
tree581b18cb457c14238e8cc05e559fe6b446815571
parent23babb1f54c9bb09d3ed8b97092a4f37d240bf7c (diff)
downloaddoc-a1968cbbedb7b3ac7dab38edaa28fc3eb3dec24e.tar.gz
doc-a1968cbbedb7b3ac7dab38edaa28fc3eb3dec24e.zip
RSS feed Security Advisories and Errata notices show first 10 entries
Show only the fist 10 entries in the security RSS feed like the old website PR: 253011 Submitted by: yasu (at) utahime.org
-rw-r--r--website/themes/beastie/layouts/security/security.rss.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/website/themes/beastie/layouts/security/security.rss.xml b/website/themes/beastie/layouts/security/security.rss.xml
index 0e0a9801f6..bace49147d 100644
--- a/website/themes/beastie/layouts/security/security.rss.xml
+++ b/website/themes/beastie/layouts/security/security.rss.xml
@@ -22,17 +22,22 @@
<guid>{{ absLangURL ($.Site.BaseURL) }}security/advisories/{{ .name }}.asc</guid>
<pubDate>{{ .date }}</pubDate>
</item>
+ {{ $securityCounter = add $securityCounter 1 }}
{{ end }}
{{ end }}
{{ end }}
{{ with .Site.Data.security.advisories }}
+ {{ $advisoriesCounter := 0 }}
{{ range (sort .advisories "date" "desc") }}
+ {{ if lt $advisoriesCounter 10 }}
<item>
<title>{{ .name }}</title>
<link>{{ absLangURL ($.Site.BaseURL) }}/security/advisories/{{ .name }}.asc</link>
<guid>{{ absLangURL ($.Site.BaseURL) }}/security/advisories/{{ .name }}.asc</guid>
<pubDate>{{ .date }}</pubDate>
</item>
+ {{ $advisoriesCounter = add $advisoriesCounter 1 }}
+ {{ end }}
{{ end }}
{{ end }}
</channel>