Merge pull request #31689 from backstage/sennyeya/api-docs-cleanup

fix: api reference build should allow navigation
This commit is contained in:
Patrik Oldsberg
2025-11-11 16:39:25 -05:00
committed by GitHub
3 changed files with 17 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': minor
---
The `package-docs` command will now automatically use a `typedoc.json` file if one exists at the root of your project.
@@ -23,6 +23,7 @@ import { mkdirp } from 'fs-extra';
import { PackageDocsCache } from './Cache';
import { Lockfile } from '@backstage/cli-node';
import { glob } from 'glob';
import { existsSync } from 'fs';
const limit = pLimit(8);
@@ -220,6 +221,9 @@ export default async function packageDocs(paths: string[] = [], opts: any) {
...HIGHLIGHT_LANGUAGES.flatMap(e => ['--highlightLanguages', e]),
'--out',
cliPaths.resolveTargetRoot('type-docs'),
...(existsSync(cliPaths.resolveTargetRoot('typedoc.json'))
? ['--options', cliPaths.resolveTargetRoot('typedoc.json')]
: []),
].join(' '),
{
cwd: cliPaths.targetRoot,
+8
View File
@@ -0,0 +1,8 @@
{
"$schema": "https://typedoc.org/schema.json",
"name": "Backstage",
"navigationLinks": {
"Docs": "https://backstage.io/docs",
"Github": "https://github.com/backstage/backstage"
}
}