Merge pull request #185 from themgt/patch-1
should sort by Page#depth so slug parts are in the right order
This commit is contained in:
commit
761a64b130
@ -69,7 +69,7 @@ class Page
|
||||
if self.index? || self.not_found?
|
||||
self.slug
|
||||
else
|
||||
slugs = self.self_and_ancestors.map(&:slug)
|
||||
slugs = self.self_and_ancestors.sort_by(&:depth).map(&:slug)
|
||||
slugs.shift unless slugs.size == 1
|
||||
File.join slugs
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user