Disable localization in all content plugins

This commit is contained in:
sebastien 2025-07-03 17:08:10 +02:00
parent 0924b8baa6
commit ae4637bec5
8 changed files with 77 additions and 64 deletions

View file

@ -74,7 +74,9 @@ export async function readDataFile(params: DataFileParams): Promise<unknown> {
* in priority.
*/
export function getContentPathList(contentPaths: ContentPaths): string[] {
return [contentPaths.contentPathLocalized, contentPaths.contentPath];
return [contentPaths.contentPathLocalized, contentPaths.contentPath].filter(
(p) => p !== undefined,
);
}
/**

View file

@ -22,7 +22,7 @@ export type ContentPaths = {
* The absolute path to the localized content directory, like
* `"<siteDir>/i18n/zh-Hans/plugin-content-docs"`.
*/
contentPathLocalized: string;
contentPathLocalized?: string;
};
/** Data structure representing each broken Markdown link to be reported. */