Repository navigation
Fix Material blog post links crash and footer link; add two plugins to the compat matrix - #129
Merged
Merged
Conversation
…plugin Both are older plugins outside the catalog's top 30 that large sites, such as TRaSH-Guides, still depend on.
The blog plugin of Material for MkDocs calls this private function as _data_to_navigation(value, Files([]), None) to build post links. MkDocs NG 1.9.0 added a required `seen` parameter, so any blog post with `links` crashed the build with a TypeError. Make `seen` optional again, and cover post links in the mkdocs-material compat case.
Contributor
Merging this PR will improve performance by 22.48%1 warning
Performance Changes
Tip Curious why performance improved? Comment Comparing |
It linked to /about/release-notes/#maintenance-team, which is outside the site (served under /mkdocs/) and a section the release notes no longer have.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Material blog posts with
linkscrash the buildFound while building the mkdocs-ng-material docs site against MkDocs NG 1.10.0rc1:
The Material blog plugin calls the private
mkdocs.structure.nav._data_to_navigation()with three arguments to build post links. #103 (in 1.9.0) added a requiredseenparameter, so every blog post that setslinksbroke.seenis optional again and defaults to a new set._data_to_navigation(data, Files([]), None)(fails with theTypeErrorbefore the fix).mkdocs-materialcompat case's blog post now setslinks. Before the fix: upstream pass, mkdocs-ng fail; after: both pass.Fix: footer "MkDocs NG Team" link
It pointed to
/about/release-notes/#maintenance-team, which is outside the site (served under/mkdocs/) and a section the release notes no longer have. It now links to https://github.com/mkdocs-ng. No other root-relative links outside/mkdocs/in the built site.Compat matrix: two more plugins
Two older plugins that aren't in the catalog's top 30 but that large sites still depend on, for example TRaSH-Guides (
docs/requirements.txtthere pins both):mkdocs-awesome-pages-plugin: version 2 of mkdocs-awesome-nav, under its old name. The case writes a.pagesfile.mkdocs-markdownextradata-plugin: rendersextravalues in Markdown. The case uses{{ project }}and{{ site_name }}.Both pass on upstream MkDocs and MkDocs NG locally.
Release notes entries under 1.10.0. Unit tests, mypy, pre-commit and the docs build pass.