git: e20bb4a200 - main - Remove the sort-by-date on the advisories/errata pages

Allan Jude allanjude at FreeBSD.org
Fri Jan 29 20:14:52 UTC 2021


The branch main has been updated by allanjude:

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

commit e20bb4a200ea1927729429bff235370138a647d2
Author:     Allan Jude <allanjude at FreeBSD.org>
AuthorDate: 2021-01-29 20:13:40 +0000
Commit:     Allan Jude <allanjude at FreeBSD.org>
CommitDate: 2021-01-29 20:13:40 +0000

    Remove the sort-by-date on the advisories/errata pages
    
    Use the existing order from the .toml files in data/security
    This resolves an issue where multiple advisories from the same
    date would be sorted in an "unnatural" order.
    
    Reported by:    emaste
    Sponsored by:   Klara Inc.
---
 website/themes/beastie/layouts/security/list.html   | 6 +++---
 website/themes/beastie/layouts/security/single.html | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/website/themes/beastie/layouts/security/list.html b/website/themes/beastie/layouts/security/list.html
index 66dc5364d5..fab09a2323 100644
--- a/website/themes/beastie/layouts/security/list.html
+++ b/website/themes/beastie/layouts/security/list.html
@@ -12,7 +12,7 @@
       <table>
         <thead>
           <tr>
-            <th>Data</th>
+            <th>Date</th>
             {{ if eq $.Params.security "notices" }}
               <th>Errata Notice name</th>
             {{ end }}
@@ -24,7 +24,7 @@
         <tbody>
           {{ if eq $.Params.security "notices" }}
             {{ with .Site.Data.security.errata }}
-              {{ range (sort .notices "date" "desc") }}
+              {{ range .notices }}
                 <tr>
                   <td class="txtdate">{{ .date }}</td>
                   <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td>
@@ -34,7 +34,7 @@
           {{ end }}
           {{ if eq $.Params.security "advisories" }}
             {{ with .Site.Data.security.advisories }}
-              {{ range (sort .advisories "date" "desc") }}
+              {{ range .advisories }}
                 <tr>
                   <td class="txtdate">{{ .date }}</td>
                   <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td>
diff --git a/website/themes/beastie/layouts/security/single.html b/website/themes/beastie/layouts/security/single.html
index 66dc5364d5..fab09a2323 100644
--- a/website/themes/beastie/layouts/security/single.html
+++ b/website/themes/beastie/layouts/security/single.html
@@ -12,7 +12,7 @@
       <table>
         <thead>
           <tr>
-            <th>Data</th>
+            <th>Date</th>
             {{ if eq $.Params.security "notices" }}
               <th>Errata Notice name</th>
             {{ end }}
@@ -24,7 +24,7 @@
         <tbody>
           {{ if eq $.Params.security "notices" }}
             {{ with .Site.Data.security.errata }}
-              {{ range (sort .notices "date" "desc") }}
+              {{ range .notices }}
                 <tr>
                   <td class="txtdate">{{ .date }}</td>
                   <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td>
@@ -34,7 +34,7 @@
           {{ end }}
           {{ if eq $.Params.security "advisories" }}
             {{ with .Site.Data.security.advisories }}
-              {{ range (sort .advisories "date" "desc") }}
+              {{ range .advisories }}
                 <tr>
                   <td class="txtdate">{{ .date }}</td>
                   <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td>


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