From 5bfc0f7d77257e79fc61c44a35da4511e90ea19d Mon Sep 17 00:00:00 2001 From: adnano Date: Mon, 17 May 2021 12:51:32 -0400 Subject: [PATCH] dir: Sort pages by date in reverse order --- dir.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir.go b/dir.go index ea6bebd..d903761 100644 --- a/dir.go +++ b/dir.go @@ -262,7 +262,7 @@ func (d *Dir) write(dstDir string, task *Task) error { func (d *Dir) sort() { sort.Slice(d.Pages, func(i, j int) bool { pi, pj := d.Pages[i], d.Pages[j] - return pi.Weight < pj.Weight || pi.Date.Before(pj.Date) || + return pi.Weight < pj.Weight || pi.Date.After(pj.Date) || pi.FilePath < pj.FilePath })