Skip to content

Fix sidebar categories to eliminate duplicate entries #36

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

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

bhouston
Copy link
Member

@bhouston bhouston commented Mar 7, 2025

Improve Sidebar Navigation and Eliminate Duplicate Entries

This PR addresses issue #34 by adding _category_.json files with a specialized configuration that eliminates duplicate entries in the sidebar navigation.

Problem Solved

Previously, we had duplicate entries in the navigation:

  • Both a standalone "Getting Started" page and a "getting-started" category
  • Both a standalone "Usage" page and a "usage" category

Solution Implemented

  • Added _category_.json files to customize category display names
  • Configured categories to use the main pages as their index pages instead of auto-generated indexes
  • This makes the main pages serve as both category entries and content pages

Changes Made

  1. Added _category_.json to the getting-started directory:

    {
      "label": "Getting Started",
      "position": 2,
      "link": {
        "type": "doc",
        "id": "getting-started"
      }
    }
  2. Added _category_.json to the usage directory:

    {
      "label": "Usage Guide",
      "position": 3,
      "link": {
        "type": "doc",
        "id": "usage"
      }
    }

Before / After

Before:

  • Duplicate entries in sidebar
  • Categories displayed as lowercase, hyphenated directory names

After:

  • Clean navigation with proper category labels
  • No duplicate entries
  • Main pages serve as both category entries and content pages

This approach maintains the existing directory structure and content organization while providing a more professional and user-friendly navigation experience.

@bhouston bhouston merged commit e8564f6 into main Mar 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant