Skip to content

When the file name is the same as the parent folder name, the generated url is missing the file name. #7725

Description

@Selflocking

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Reproducible demo: https://codesandbox.io/s/busy-lake-7grh3p?file=/sidebars.js

For example a file like this

docs/
├── storage/
│   ├── storage.md
│   └── ...

The expectation is to access it via /docs/storage/storage
But in fact docusaurus generates /docs/storage
image

Reproducible demo

https://codesandbox.io/s/busy-lake-7grh3p?file=/sidebars.js

Steps to reproduce

When the file name is the same as the parent folder name, like:

docs/
├── storage/
│   ├── storage.md
│   └── ...

Expected behavior

via /docs/storage/storage

Actual behavior

/docs/storage

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed: working as intendedThis issue is intended behavior, there's no need to take any action.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions