| 469 | collection == "docs" |
| 470 | && (slug.contains("audit") |
| 471 | || slug.contains("_design") |
| 472 | || slug.contains("_abi_") |
| 473 | || slug.ends_with("_design")) |
| 474 | } |
| 475 | |
| 476 | fn nav_group(collection: &str, slug: &str, history: bool) -> &'static str { |
| 477 | if collection == "book" { |
| 478 | return "Book"; |
| 479 | } |
| 480 | if history { |
| 481 | return "History"; |
| 482 | } |
| 483 | if slug == "index" |
| 484 | || slug == "writing_standard" |
| 485 | || slug.starts_with("tools/") |
| 486 | || matches!( |
| 487 | slug, |
| 488 | "project/feature_matrix" | "project/project_toml" | "project/performance_philosophy" |
| 489 | ) |
| 490 | { |
| 491 | "Start" |
| 492 | } else if slug.starts_with("resources/") { |
| 493 | "Assets" |
| 494 | } else if slug == "WASM" || slug.starts_with("platform/") || slug.starts_with("networking/") { |
| 495 | "Platforms" |
| 496 | } else if slug.starts_with("scripting/contexts/") { |
| 497 | "Runtime" |