diff --git a/packages/techdocs-common/src/stages/generate/techdocs.ts b/packages/techdocs-common/src/stages/generate/techdocs.ts index 13bb63ca44..1a6577cad9 100644 --- a/packages/techdocs-common/src/stages/generate/techdocs.ts +++ b/packages/techdocs-common/src/stages/generate/techdocs.ts @@ -16,6 +16,7 @@ import { ContainerRunner } from '@backstage/backend-common'; import { Config } from '@backstage/config'; +import path from 'path'; import { Logger } from 'winston'; import { addBuildTimestampMetadata, @@ -72,9 +73,13 @@ export class TechdocsGenerator implements GeneratorBase { logStream, }: GeneratorRunOptions): Promise { // Do some updates to mkdocs.yml before generating docs e.g. adding repo_url - const { path, content } = await getMkdocsYml(inputDir); + const { path: mkdocsYmlPath, content } = await getMkdocsYml(inputDir); if (parsedLocationAnnotation) { - await patchMkdocsYmlPreBuild(path, childLogger, parsedLocationAnnotation); + await patchMkdocsYmlPreBuild( + mkdocsYmlPath, + childLogger, + parsedLocationAnnotation, + ); } await validateMkdocsYaml(inputDir, content);