Conversation
PR #177 removed `default_author` from `process_html()` but `main.py` still passed it, causing silent failures for users running `mkdocs build`. The fix aligns `main.py` with `postprocess.py` by calling `resolve_all_authors()` during `on_config()` instead of passing `default_author` to `process_html()`.
|
👋 Hello @fcakyon, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Summary
The diff looks clean and correctly addresses the stated goal: author metadata is normalized once during on_config() via resolve_all_authors(), and default_author is no longer redundantly threaded into process_html(). No bugs, regressions, or missing error handling are apparent from the changed lines.
Summary
default_authorwas passed toprocess_html()but that function no longer accepts itpostprocess.pyby callingresolve_all_authors()inon_config()Problem
PR #177 removed
default_authorfromprocess_html()but didn't updatemain.py. Running mkdocs build with add_authors: true or add_json_ld: true would crash with:Why ultralytics CI didn't catch this:
build_docs.pyuseszensical build+ directpostprocess_site()call, bypassing the plugin'son_post_pagehook where the bug occurs.When this matters: If we switch back from zensical to mkdocs build, builds would fail without this fix.
Fix
Align main.py with postprocess.py:
resolve_all_authorsfromplugin.utilsresolve_all_authors()inon_config()after building git_datadefault_authorfromprocess_html()callThis is the same flow that
postprocess.pyuses.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Fixes a
default_authorhandling bug by resolving author metadata once during MkDocs config setup ✅📊 Key Changes
resolve_all_authorsto pre-processgit_dataduringon_config()default_author,repo_url, andverbosesettingsdefault_authorintoprocess_html()since authors are now resolved upfront🎯 Purpose & Impact
default_authorusage 🐛git_datais fully normalized early