summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2015-09-30 05:43:11 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2015-09-30 05:43:11 +0200
commitdcd9c69aa8e7532355b7b8ccfd9fa2c454bfe236 (patch)
treef200caded172a8b264e221caf22782f410d0cbfe /hugolib
parent7708d4556d6a829bbd2fbd487e64c069f17f4dbc (diff)
Use filepath as the last default sort key for pages
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/pageSort.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/hugolib/pageSort.go b/hugolib/pageSort.go
index ec62ca7e5..b536c2339 100644
--- a/hugolib/pageSort.go
+++ b/hugolib/pageSort.go
@@ -43,6 +43,9 @@ func (by PageBy) Sort(pages Pages) {
var DefaultPageSort = func(p1, p2 *Page) bool {
if p1.Weight == p2.Weight {
if p1.Date.Unix() == p2.Date.Unix() {
+ if p1.LinkTitle() == p2.LinkTitle() {
+ return (p1.FullFilePath() < p2.FullFilePath())
+ }
return (p1.LinkTitle() < p2.LinkTitle())
}
return p1.Date.Unix() > p2.Date.Unix()