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

chore: enable navigation pruning #311

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

HonkingGoose
Copy link
Collaborator

Changes:

  • Enable new Material for MkDocs feature: navigation pruning 1

Context:

When pruning is enabled, only the visible navigation items are included in the rendered HTML, reducing the size of the built site by 33% or more. Add the following lines to mkdocs.yml:

theme:
  features:
    - navigation.prune

This feature flag is not compatible with navigation.expand, as navigation expansion requires the complete navigation structure.

This feature flag is especially useful for documentation sites with 100+ or even 1,000+ of pages, as the navigation makes up a significant fraction of the HTML.
Navigation pruning will replace all expandable sections with links to the first page in that section (or the section index page).

Footnotes

  1. https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#navigation-pruning

@rarkins rarkins merged commit 0ccabc9 into renovatebot:main Aug 28, 2023
2 checks passed
@HonkingGoose HonkingGoose deleted the chore/new-material-features branch August 28, 2023 11:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants