()
| 12 | * Resolved per-call (not a module const) so tests can point it at a fixture. |
| 13 | */ |
| 14 | export function docsRoot(): string { |
| 15 | return process.env.DOCS_ROOT |
| 16 | ? resolve(process.env.DOCS_ROOT) |
| 17 | : resolve(process.cwd(), "..", "..", "docs"); |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Resolve a URL slug to an absolute path under the docs root, or null if the |