Skip to content

Build failed after upgrade to 3.3.2 with a _category_.json contain slug attribute #10125

Closed
@antoniohou

Description

@antoniohou

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

After I upgrade to 3.3.2, my website start to build failed.
I find that if my docs has routeBasePath: '/' in docusaurus.config.js and a category.json have "slug": "/" it will have error.
Please help thanks!

Reproducible demo

https://github.com/antoniohou/Docusaurus-Test

Steps to reproduce

  1. Create website with command npx create-docusaurus@latest my-website classic
  2. Delete src/pages/index.js
  3. Add routeBasePath: '/' in docs in docusaurus.config.js
  4. Add "slug": "/" in docs/tutorial-basics/category.json

Expected behavior

Build success.

Actual behavior

Build failed.

Your environment

No response

Self-service

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions