-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Possible regression in Blog functionality #5973
Comments
Thanks for reporting. This is a duplicate of #5971 – it's related to the section index plugin, where |
Possible workaround: remove section-index and use Material for MkDocs |
It is not a duplicate of #5971 |
@oprypin thanks for investigating! Checking again, it looks related to the fact that the section index plugin replaces the page in the navigation, so the page that was priorly assigned to the blog does not exist in the navigation anymore. Note that we currently have a hack in place to mount the blog at the correct location in the navigation: mkdocs-material/src/plugins/blog/plugin.py Lines 170 to 192 in 6ffc9f4
This hack assumes that the page that MkDocs created in mkdocs-material/src/plugins/blog/plugin.py Lines 161 to 166 in 6ffc9f4
We already raised an issue upstream saying that MkDocs should probably allow plugins to create their own page objects to implement custom behaviors, which is necessary for blog posts, as all metadata must be available to generate archive and category files/pages, as well as for those pages, which we generate in
In general, it looks like it's a good time to rethink navigation population and page construction in MkDocs to allow for more sophisticated plugins like the blog plugin. The section index plugin also uses a (rather unorthodox? not sure) approach to circumvent the behavior that is fixed by the aforementioned PR here. Happy for any feedback and to gravitate towards a solution that makes the plugin ecosystem work together in a better and more empowering way |
Happy to report that using Thank you all! |
Thanks for checking back! |
Context
Hello:
I was utilizing the blog feature with the beta release 9.2.0b2. Dependabot has made updates to the latest version of
mkdocs-material
, and in the latest release there appears to be a regression.Bug description
When running
mkdocs build
ormkdocs serve
on the latest versions ofmkdocs-material
(9.2.8), I encounter the following stack trace:Here is a link to the GH action where this is happening: https://github.com/gemini-oss/starfleet/pull/91/checks
When going from the beta release of
9.2.0b2
to9.2.8
, I had to make a change to the.authors.yml
file, which I did accordingly: https://github.com/gemini-oss/starfleet/pull/91/files#diff-587acea3a21bb5b4b2aee25b9d125cbbb7611164d7e41b31bf1c91ffa15676f7.However, for some reason, all real versions after the beta releases cause an issue. I haven't had time to pop a debugger in, but just wanted to get this documented in case anyone else saw this.
I see the error above regardless if I have the link to the blog in
mkdocs.yml
. That file is here: https://github.com/gemini-oss/starfleet/blob/main/mkdocs.yml. I also made no changes to this file; only change made was to the authors file since the initial error message informed me of the schema change.Also while going through the bug reporting page, I followed the instructions to disable the extra css as well as the
gen_files
plugin and it had no impact.Related links
Reproduction
9.2.8-blog-regression.zip
Steps to reproduce
mkdocs serve
ormkdocs build
Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: