mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
refactor: remove "error" reporting level, move reportMessage to logger (#7642)
This commit is contained in:
parent
1b9bec1042
commit
bfba6a8b02
16 changed files with 117 additions and 116 deletions
|
@ -13,7 +13,6 @@ import {
|
|||
docuHash,
|
||||
aliasedSitePath,
|
||||
getContentPathList,
|
||||
reportMessage,
|
||||
posixPath,
|
||||
addTrailingPathSeparator,
|
||||
createAbsoluteFilePathMatcher,
|
||||
|
@ -330,13 +329,9 @@ export default async function pluginContentDocs(
|
|||
sourceToPermalink: getSourceToPermalink(),
|
||||
versionsMetadata,
|
||||
onBrokenMarkdownLink: (brokenMarkdownLink) => {
|
||||
if (siteConfig.onBrokenMarkdownLinks === 'ignore') {
|
||||
return;
|
||||
}
|
||||
reportMessage(
|
||||
`Docs markdown link couldn't be resolved: (${brokenMarkdownLink.link}) in ${brokenMarkdownLink.filePath} for version ${brokenMarkdownLink.contentPaths.versionName}`,
|
||||
logger.report(
|
||||
siteConfig.onBrokenMarkdownLinks,
|
||||
);
|
||||
)`Docs markdown link couldn't be resolved: (url=${brokenMarkdownLink.link}) in path=${brokenMarkdownLink.filePath} for version number=${brokenMarkdownLink.contentPaths.versionName}`;
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue