git: a1968cbbed - main - RSS feed Security Advisories and Errata notices show first 10 entries

Sergio Carlavilla Delgado carlavilla at FreeBSD.org
Sun May 16 10:37:39 UTC 2021


The branch main has been updated by carlavilla:

URL: https://cgit.FreeBSD.org/doc/commit/?id=a1968cbbedb7b3ac7dab38edaa28fc3eb3dec24e

commit a1968cbbedb7b3ac7dab38edaa28fc3eb3dec24e
Author:     Sergio Carlavilla Delgado <carlavilla at FreeBSD.org>
AuthorDate: 2021-05-16 10:32:57 +0000
Commit:     Sergio Carlavilla Delgado <carlavilla at FreeBSD.org>
CommitDate: 2021-05-16 10:32:57 +0000

    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
---
 website/themes/beastie/layouts/security/security.rss.xml | 5 +++++
 1 file changed, 5 insertions(+)

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>


More information about the dev-commits-doc-all mailing list