Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
6 of 7 tasks
Selflocking opened this issue Jul 5, 2022 · 1 comment
Labels
closed: working as intended This issue is intended behavior, there's no need to take any action.

Comments

@Selflocking
Copy link

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.
@Selflocking Selflocking added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jul 5, 2022
@Josh-Cena
Copy link
Collaborator

Josh-Cena commented Jul 5, 2022

Hi, this is a feature. See https://docusaurus.io/docs/next/sidebar/autogenerated#category-index-convention and #5830.

If you want to override this, just use the slug front matter.

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2022
@Josh-Cena Josh-Cena added closed: working as intended This issue is intended behavior, there's no need to take any action. and removed bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: working as intended This issue is intended behavior, there's no need to take any action.
Projects
None yet
Development

No branches or pull requests

2 participants