mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
feat: allow customizing localization path of each locale (#7624)
This commit is contained in:
parent
39e3e3715e
commit
1b9bec1042
24 changed files with 254 additions and 30 deletions
|
@ -0,0 +1 @@
|
|||
[{ "type": "autogenerated", "dirName": "." }]
|
|
@ -66,3 +66,12 @@ exports[`docsVersion second docs instance versioning 1`] = `
|
|||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`docsVersion works with custom i18n paths 1`] = `
|
||||
[
|
||||
{
|
||||
"dirName": ".",
|
||||
"type": "autogenerated",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
|
Binary file not shown.
|
@ -85,9 +85,11 @@ export async function cliDocsVersionCommand(
|
|||
|
||||
await Promise.all(
|
||||
i18n.locales.map(async (locale) => {
|
||||
// TODO duplicated logic from core, so duplicate comment as well: we need
|
||||
// to support customization per-locale in the future
|
||||
const localizationDir = path.resolve(siteDir, i18n.path, locale);
|
||||
const localizationDir = path.resolve(
|
||||
siteDir,
|
||||
i18n.path,
|
||||
i18n.localeConfigs[locale]!.path,
|
||||
);
|
||||
// Copy docs files.
|
||||
const docsDir =
|
||||
locale === i18n.defaultLocale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue