-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Если сменить defaultLocale: 'ru', на en, то:
/docs/introотдает английскую страницу/ru/docs/introвыбивает "Page Not Found"
Т.е. нужно как-то заставить Docusaurus отдавать содержимое папки /docs по /ru/docs роуту. И он это делает, если запускать через npm run start -- --locale ru. А всему виной ограничения:
Each locale is a distinct standalone single-page application: it is not possible to start the Docusaurus sites in all locales at the same time.
— https://docusaurus.io/docs/i18n/tutorial#start-your-site
i18n.localeConfigs.ru.path
Установка i18n.localeConfigs.ru.path на /docs не помогла:
i18n: {
localeConfigs: {
ru: {
path: "/docs"
}
}routeBasePath
Если установить routeBasePath на "ru/docs", то ко всем ссылкам добавляется ru:
/docs/introменяется на/ru/docs/introи отдает статью на английском/ru/docs/intro— на/ru/ru/docs/introи все равно выбивает "Page Not Found"
Переместить /docs в /i18n/ru
Если переместить /docs в /18n/ru/docusaurus-plugin-content-docs/current/ то выбивает:
[ERROR] Error: The docs folder does not exist for version "current". A docs folder is expected to be found at docs.
Источники
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels