Skip to content

Duplicate sidebar items when grouped by tagGroup fails the Docusaurus build in Docusaurus 3.9+ #1316

@gotson

Description

@gotson

Describe the bug

When grouping sidebar items by tagGroup, it can happen that the same item exists in different tags.

Since Docusaurus 3.9+ this fails with the following error: Multiple docs sidebar items produce the same translation key

Expected behavior

The auto-generated sidebar should include the new key property, and ensure it is unique.

Current behavior

The build fails.

Possible solution

A unique key attribute could be generated by concatenating the tagGroup with the operation id.

Steps to reproduce

You can use this OpenAPI spec to reproduce: https://raw.githubusercontent.com/gotson/komga/refs/heads/master/komga/docs/openapi.json

sidebarOptions: {
                            groupPathsBy: 'tagGroup',
                            categoryLinkSource: 'tag',
                        }

Context

This prevents me to upgrade to Docusaurus 3.9.

Here is my failed CI build after upgrading to 3.9: https://github.com/gotson/komga-website/actions/runs/22380448084/job/64779769045

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions