diff --git a/src/components/Site/Site.jsx b/src/components/Site/Site.jsx index 89dd33b59c88..600fe112cc24 100644 --- a/src/components/Site/Site.jsx +++ b/src/components/Site/Site.jsx @@ -44,9 +44,17 @@ const Site = ({ title: section.path.title, url: section.url, pages: section.pages.map(page => ({ + file: page.file, title: page.file.title, url: page.url - })) + })).sort(({ file: { attributes: a }}, { file: { attributes: b }}) => { + let group1 = a.group.toLowerCase(); + let group2 = b.group.toLowerCase(); + + if (group1 < group2) return -1; + if (group1 > group2) return 1; + return a.sort - b.sort; + }) })) } />