From 3903ad694b3727a1ff52a946f232e37e80daf938 Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Sun, 9 Nov 2025 09:36:00 -0500 Subject: [PATCH 1/2] fix: api reference build should allow navigation Signed-off-by: aramissennyeydd --- packages/repo-tools/src/commands/package-docs/command.ts | 4 ++++ typedoc.json | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 typedoc.json diff --git a/packages/repo-tools/src/commands/package-docs/command.ts b/packages/repo-tools/src/commands/package-docs/command.ts index 174a1d949d..28255193f0 100644 --- a/packages/repo-tools/src/commands/package-docs/command.ts +++ b/packages/repo-tools/src/commands/package-docs/command.ts @@ -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, diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000000..608b95a515 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "name": "Backstage", + "navigationLinks": { + "Docs": "https://backstage.io/docs", + "Github": "https://github.com/backstage/backstage" + } +} From 11c61f2e8de8dd4d46b715b49a8ed26f4d980d88 Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Sun, 9 Nov 2025 09:37:11 -0500 Subject: [PATCH 2/2] add changeset Signed-off-by: aramissennyeydd --- .changeset/long-impalas-burn.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/long-impalas-burn.md diff --git a/.changeset/long-impalas-burn.md b/.changeset/long-impalas-burn.md new file mode 100644 index 0000000000..ef70f65f78 --- /dev/null +++ b/.changeset/long-impalas-burn.md @@ -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.