Skip to content

Commit 375489a

Browse files
maxaloneclaude
andcommitted
fix: Decisioni in ordine cronologico inverso (più recenti in cima)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 1def464 commit 375489a

3 files changed

Lines changed: 124 additions & 123 deletions

File tree

generators/build-site.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,12 @@ function renderDecisions(records) {
171171
const adrs = byFolder(records, "decisions")
172172
.filter((a) => a.visibility === "public")
173173
.sort((a, b) => {
174-
if (a.date !== b.date) return a.date < b.date ? -1 : 1;
174+
// Cronologia inversa: più recenti in cima.
175+
if (a.date !== b.date) return a.date > b.date ? -1 : 1;
175176
const pa = phaseNumber(a.id);
176177
const pb = phaseNumber(b.id);
177-
if (pa !== pb) return pa - pb;
178-
return a.id.localeCompare(b.id);
178+
if (pa !== pb) return pb - pa;
179+
return b.id.localeCompare(a.id);
179180
});
180181
const items = adrs
181182
.map(

0 commit comments

Comments
 (0)