File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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." )
You can’t perform that action at this time.
0 commit comments