fix blog case

This commit is contained in:
sebastien 2025-07-04 12:43:47 +02:00
parent c1183ac89b
commit 68cae1bf4c
2 changed files with 7 additions and 3 deletions

View file

@ -323,7 +323,9 @@ async function processBlogSourceFile(
} else if (typeof editUrl === 'string') {
const isLocalized = blogDirPath === contentPaths.contentPathLocalized;
const fileContentPath =
isLocalized && options.editLocalizedFiles
isLocalized &&
options.editLocalizedFiles &&
contentPaths.contentPathLocalized
? contentPaths.contentPathLocalized
: contentPaths.contentPath;

View file

@ -20,9 +20,11 @@ export type ContentPaths = {
contentPath: string;
/**
* The absolute path to the localized content directory, like
* `"<siteDir>/i18n/zh-Hans/plugin-content-docs"`.
* `"<siteDir>/i18n/zh-Hans/plugin-content-blog"`.
*
* Undefined when the locale has `translate: false` config
*/
contentPathLocalized?: string;
contentPathLocalized: string | undefined;
};
/** Data structure representing each broken Markdown link to be reported. */