Skip to content

Pages with redirects instead of translations when docsUrl === '' and path to file includes 'en' #2306

Closed

Description

@kav137

🐛 Bug Report

When docsUrl is set to an empty string, localization enabled and path to the file contains "en" letters, then pages with redirects would be generated instead of pages with contents. So, it is impossible to reach the content

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

  1. run npm run examples translations to make localization files available
  2. enable any other language (let's say "ru") in translations.js
  3. in docs folder create a folder named "components" (or any other name, containing "en" letters) and put .md file there
  4. add a link to that file to sidebars.js, so that you can reach it
  5. copy the content of docs folder to website/translated_docs/ru so that localized files are visible to the system
  6. set docsUrl: '' in siteConfig.js
  7. run npm run build

Expected behavior

file build/test-site/ru/components/myFile.html contains data from the original file website/translated_docs/ru/components/myFile.md

Actual Behavior

file build/test-site/ru/components/myFile.html contains redirection link to the file itself

Please, see the screenshot

image

Reproducible Demo

kav137/docusaurusDocs@5e54a03

Activity

  1. added
    bug
    status: needs triage
    on Feb 20, 2020
  2. added
    v1
    and removed
    status: needs triage
    on Apr 30, 2020
  3. slorber commented on Jun 10, 2021

    @slorber
    Collaborator

    The Docusaurus team is actively working on Docusaurus v2.

    After a very long alpha, Docusaurus v2 is now in beta.
    We believe that the v2 beta is already better than v1, and v2 is ready for maintstream adoption.

    Apart from critical issues and security fixes, we don't plan to invest much time on Docusaurus v1 anymore.

    We are all closing v1 issues.
    Maybe the current issue is already fixed in Docusaurus v2.
    Please try to upgrade, and if the issue is still there on Docusaurus v2, open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugv1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions