Merge pull request #11812 from backstage/blam/fix-microsite

chore: fix microsite building
This commit is contained in:
Patrik Oldsberg
2022-06-02 15:40:17 +02:00
committed by GitHub
+11 -1
View File
@@ -40,7 +40,7 @@ import {
TSDocTagSyntaxKind,
} from '@microsoft/tsdoc';
import { TSDocConfigFile } from '@microsoft/tsdoc-config';
import { ApiPackage, ApiModel } from '@microsoft/api-extractor-model';
import { ApiPackage, ApiModel, ApiItem } from '@microsoft/api-extractor-model';
import {
IMarkdownDocumenterOptions,
MarkdownDocumenter,
@@ -939,6 +939,16 @@ async function buildDocs({
this._markdownEmitter = new CustomCustomMarkdownEmitter(newModel);
}
private _getFilenameForApiItem(apiItem: ApiItem): string {
const filename: string = super._getFilenameForApiItem(apiItem);
if (filename.includes('.html.')) {
return filename.replace(/\.html\./g, '._html.');
}
return filename;
}
// We don't really get many chances to modify the generated AST
// so we hook in wherever we can. In this case we add the front matter
// just before writing the breadcrumbs at the top.