Merge pull request #31689 from backstage/sennyeya/api-docs-cleanup
fix: api reference build should allow navigation
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://typedoc.org/schema.json",
|
||||
"name": "Backstage",
|
||||
"navigationLinks": {
|
||||
"Docs": "https://backstage.io/docs",
|
||||
"Github": "https://github.com/backstage/backstage"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user