Fix default_author parameter bug from PR #177 #180
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.
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