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

feat(website): improve docs menu #2464

Merged
merged 7 commits into from
Aug 21, 2024
Merged

feat(website): improve docs menu #2464

merged 7 commits into from
Aug 21, 2024

Conversation

theosanderson
Copy link
Member

@theosanderson theosanderson commented Aug 19, 2024

Enhance DocsMenu Component with Improved Index Page Handling and Directory Sorting

Overview

This PR updates the DocsMenu component to better handle index pages and implement sorting of directories based on the order property of their respective index pages. These changes aim to improve the navigation structure and provide more control over the menu's organization.

Key Changes

  1. Index Page Handling

    • Index pages (e.g., index.mdx) are now linked from the top-level directory names.
    • Index pages are excluded from the sublist of pages for each directory.
  2. Directory Sorting

    • Directories are now sorted based on the order property of their index pages.
  3. Directory Title Display

    • The displayed title for each directory now uses the title from the index page if available, falling back to the directory name if not.
  4. Code Refactoring
    Less code duplication

@theosanderson theosanderson added the format_me Triggers github_actions to format website code on PR label Aug 19, 2024
@theosanderson theosanderson changed the title improve docs menu feat(website): improve docs menu Aug 19, 2024
@theosanderson theosanderson marked this pull request as draft August 19, 2024 23:25
@theosanderson theosanderson marked this pull request as ready for review August 21, 2024 15:55
@theosanderson theosanderson added the review please PR waiting for final review label Aug 21, 2024
@emmahodcroft
Copy link
Member

I'm excited to have an improved docs menu but won't pretend I understand the changes! 😁

@theosanderson theosanderson merged commit f6b7a2c into main Aug 21, 2024
16 checks passed
@theosanderson theosanderson deleted the docsmenu branch August 21, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_me Triggers github_actions to format website code on PR review please PR waiting for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants