(pages: Page[])
| 195 | } |
| 196 | |
| 197 | function sortOverview(pages: Page[]): Page[] { |
| 198 | return [...pages] |
| 199 | .filter(page => !page.exports?.isSubpage) |
| 200 | .sort((a, b) => { |
| 201 | let aIntro = a.url.endsWith('getting-started'); |
| 202 | let bIntro = b.url.endsWith('getting-started'); |
| 203 | if (aIntro && !bIntro) { |
| 204 | return -1; |
| 205 | } |
| 206 | if (!aIntro && bIntro) { |
| 207 | return 1; |
| 208 | } |
| 209 | return title(a).localeCompare(title(b)); |
| 210 | }); |
| 211 | } |
| 212 | |
| 213 | function getDefaultExpandedKeys(currentPage: Page): string[] { |
| 214 | let keys = new Set<string>(); |