Skip to content

Commit 9aeb32f

Browse files
committed
Update sidebar after writing quartodoc config
1 parent e159c5d commit 9aeb32f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

great_docs/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,13 +2270,13 @@ def _refresh_quartodoc_config(self) -> None:
22702270
config["quartodoc"]["sections"] = sections
22712271
print(f"Updated quartodoc config with {len(sections)} section(s)")
22722272

2273-
# Also update the sidebar to match the new sections
2274-
self._update_sidebar_from_sections()
2275-
2276-
# Write back to file
2273+
# Write back to file first, so sidebar update reads the new sections
22772274
with open(quarto_yml, "w") as f:
22782275
yaml.dump(config, f, default_flow_style=False, sort_keys=False)
22792276

2277+
# Now update the sidebar to match the new sections
2278+
self._update_sidebar_from_sections()
2279+
22802280
print(f"✅ Refreshed quartodoc configuration in {quarto_yml}")
22812281
else:
22822282
print("Warning: Could not discover package exports. Config unchanged.")

0 commit comments

Comments
 (0)