mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-22 19:17:46 +02:00
feat(core): allow customizing the i18n directory path (#7386)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
c07a514730
commit
abe5450526
26 changed files with 147 additions and 166 deletions
|
@ -55,19 +55,16 @@ export function getVersionSidebarsPath(
|
|||
}
|
||||
|
||||
export function getDocsDirPathLocalized({
|
||||
siteDir,
|
||||
locale,
|
||||
localizationDir,
|
||||
pluginId,
|
||||
versionName,
|
||||
}: {
|
||||
siteDir: string;
|
||||
locale: string;
|
||||
localizationDir: string;
|
||||
pluginId: string;
|
||||
versionName: string;
|
||||
}): string {
|
||||
return getPluginI18nPath({
|
||||
siteDir,
|
||||
locale,
|
||||
localizationDir,
|
||||
pluginName: 'docusaurus-plugin-content-docs',
|
||||
pluginId,
|
||||
subPaths: [
|
||||
|
@ -175,8 +172,7 @@ export async function getVersionMetadataPaths({
|
|||
> {
|
||||
const isCurrent = versionName === CURRENT_VERSION_NAME;
|
||||
const contentPathLocalized = getDocsDirPathLocalized({
|
||||
siteDir: context.siteDir,
|
||||
locale: context.i18n.currentLocale,
|
||||
localizationDir: context.localizationDir,
|
||||
pluginId: options.id,
|
||||
versionName,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue