Skip to content

Commit 72dda54

Browse files
committed
Update core.py
1 parent ddee3a4 commit 72dda54

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

great_docs/core.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,19 @@ def show_progress(stop_event, message):
29632963
shutil.copy2(gh_widget_src, gh_widget_dst)
29642964

29652965
# Update navbar to use GitHub widget (if configured)
2966-
self._update_navbar_github_link()
2966+
quarto_yml = self.project_path / "_quarto.yml"
2967+
if quarto_yml.exists():
2968+
with open(quarto_yml) as f:
2969+
config = yaml.safe_load(f)
2970+
2971+
owner, repo, repo_url = self._get_github_repo_info()
2972+
metadata = self._get_package_metadata()
2973+
github_style = metadata.get("github_style", "widget")
2974+
2975+
if config and "website" in config and "navbar" in config["website"]:
2976+
self._update_navbar_github_link(config, owner, repo, repo_url, github_style)
2977+
with open(quarto_yml, "w") as f:
2978+
yaml.dump(config, f, default_flow_style=False, sort_keys=False)
29672979

29682980
# Step 0: Rebuild index.qmd from source file (README.md, index.md, or index.qmd)
29692981
print("\n📄 Step 0: Syncing landing page with source file...")

0 commit comments

Comments
 (0)