From 7cb5f5019b5df76e3201cd73b011cfbeef32c329 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 6 Oct 2024 16:04:03 -0600 Subject: [PATCH] Omit modules page in less circumstances Resolves #2730 --- CHANGELOG.md | 1 + src/lib/output/themes/default/DefaultTheme.tsx | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4fbdaf19..fa1ef0b87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Bug Fixes - `externalSymbolLinkMappings` now uses the TypeScript reported link target if available, #2725. +- TypeDoc will no longer omit the modules page if a project contains only modules/documents, #2730. ## v0.26.8 (2024-10-04) diff --git a/src/lib/output/themes/default/DefaultTheme.tsx b/src/lib/output/themes/default/DefaultTheme.tsx index 597abf535..622ccab44 100644 --- a/src/lib/output/themes/default/DefaultTheme.tsx +++ b/src/lib/output/themes/default/DefaultTheme.tsx @@ -208,11 +208,6 @@ export class DefaultTheme extends Theme { if (!hasReadme(this.application.options.getValue("readme"))) { project.url = "index.html"; urls.push(new UrlMapping("index.html", project, this.reflectionTemplate)); - } else if (project.children?.every((child) => child.kindOf(ReflectionKind.Module))) { - // If there are no non-module children, then there's no point in having a modules page since there - // will be nothing on it besides the navigation, so redirect the module page to the readme page - project.url = "index.html"; - urls.push(new UrlMapping("index.html", project, this.indexTemplate)); } else { project.url = "modules.html"; urls.push(new UrlMapping("modules.html", project, this.reflectionTemplate));