Skip to content

Commit df75c2d

Browse files
Fix default_author parameter bug from PR #177 (#180)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
1 parent 0a3caff commit df75c2d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

plugin/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import plugin.processor as processor
1111
from plugin.processor import process_html
12+
from plugin.utils import resolve_all_authors
1213

1314

1415
class MetaPlugin(BasePlugin):
@@ -44,6 +45,12 @@ def on_config(self, config):
4445
docs_dir = Path(config["docs_dir"])
4546
md_files = [str(p) for p in docs_dir.rglob("*.md")] if docs_dir.exists() else []
4647
self.git_repo_url, self.git_data = processor.build_git_map(md_files)
48+
self.git_data = resolve_all_authors(
49+
self.git_data,
50+
default_author=self.config.get("default_author"),
51+
repo_url=self.git_repo_url,
52+
verbose=self.config.get("verbose", True),
53+
)
4754
return config
4855

4956
def on_post_page(self, output: str, page, config) -> str:
@@ -70,7 +77,6 @@ def on_post_page(self, output: str, page, config) -> str:
7077
git_data=self.git_data,
7178
repo_url=self.git_repo_url,
7279
default_image=self.config["default_image"],
73-
default_author=self.config["default_author"],
7480
keywords=keywords,
7581
add_desc=self.config["add_desc"],
7682
add_image=self.config["add_image"],

0 commit comments

Comments
 (0)