Skip to content

Commit

Permalink
Omit modules page in less circumstances
Browse files Browse the repository at this point in the history
Resolves #2730
  • Loading branch information
Gerrit0 committed Oct 6, 2024
1 parent 1cefc01 commit 7cb5f50
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 0 additions & 5 deletions src/lib/output/themes/default/DefaultTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ export class DefaultTheme extends Theme {
if (!hasReadme(this.application.options.getValue("readme"))) {
project.url = "index.html";
urls.push(new UrlMapping<ContainerReflection>("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));
Expand Down

0 comments on commit 7cb5f50

Please sign in to comment.