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

Support for Category-Specific Sidebars to Reduce Artifact Size in MkDocs Monorepo Plugin #201

Closed
RaizadaHaroon opened this issue Jul 1, 2024 · 3 comments
Labels

Comments

@RaizadaHaroon
Copy link

We are managing documentation for around 100 products in a single repository using the MkDocs Monorepo Plugin. The root mkdocs.yml file utilizes !include to include configuration files for each product.

Current Structure:

mkdocs.yml
products/
    prod1/
        mkdocs.yml
        docs/
            index.md
            topic1.md
            topic2.md
    prod2/
        mkdocs.yml
        docs/
            index.md
            topic1.md
            topic2.md
    # and so on for 100 products
docs/
    index.md

Root mkdocs.yml Configuration:

site_name: 'Main Documentation Site'
nav:
  - Home: index.md
  - Products:
      !include: 'products/prod1/mkdocs.yml'
      !include: 'products/prod2/mkdocs.yml'
      # Add more products as needed
plugins:
  - search
  - monorepo

Concern:

Currently, each rendered HTML page includes the sidebar tree for all 100 products, which significantly increases the artifact size. This is inefficient and can negatively impact the performance and usability of our documentation site.

@awanlin
Copy link
Collaborator

awanlin commented Jul 2, 2024

Hi @RaizadaHaroon, It's not clear to me how this can be avoided as you are explicitly adding this as you mention. Can you share what you would like to see done for a case like this?

@RaizadaHaroon
Copy link
Author

he root mkdocs.yml includes 100 product-specific MkDocs configurations. To manage the large sidebar size, we are using the navigation.prune setting to reduce artifact size. However, this leads to an undesired behavior: clicking on a top-level section in the navigation opens the first available page instead of staying on the current page or expanding the section.

Copy link

github-actions bot commented Nov 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 9, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants