docs: enhance how references are generated (#5805)

* adjusted configurations

* enhancements to tool and configurations

* change reference in docs

* fixed issue in workflows reference

* added project name

* more optimizations

* fix context error

* added a types reference

* resolved missing types

* fix reference reflection types not having children

* add an expand url parameter

* added new option to the README

* added details about new option
This commit is contained in:
Shahed Nasser
2023-12-05 15:29:41 +02:00
committed by GitHub
parent a418e6cebc
commit 892d737c1f
4358 changed files with 947876 additions and 534760 deletions
@@ -4,28 +4,34 @@ import {
ReflectionKind,
} from "typedoc"
const MAX_LEVEL = 3
export function getProjectChild(
project: ProjectReflection,
childName: string
childName: string,
level = 1
): DeclarationReflection | undefined {
let reflection: DeclarationReflection | undefined = project.getChildByName(
childName
) as DeclarationReflection
const splitChildName = childName.split(".")
const canExpandFurther = level <= MAX_LEVEL
if (!reflection && splitChildName.length > 1) {
if (!reflection && splitChildName.length > 1 && canExpandFurther) {
reflection = getProjectChild(
project,
splitChildName[splitChildName.length - 1]
splitChildName[splitChildName.length - 1],
level + 1
)
}
if (
!reflection &&
project.parent &&
project.parent instanceof ProjectReflection
project.parent instanceof ProjectReflection &&
canExpandFurther
) {
reflection = getProjectChild(project.parent, childName)
reflection = getProjectChild(project.parent, childName, level + 1)
}
if (!reflection) {