From d8f47ff9e4d56e32b55a647061a54391261871a0 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Tue, 11 Feb 2025 19:46:57 +0000 Subject: [PATCH] Add multi-type modules to all headings on TOC --- docs/scripts/scripts.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/scripts/scripts.py b/docs/scripts/scripts.py index f2bf709..f73315b 100644 --- a/docs/scripts/scripts.py +++ b/docs/scripts/scripts.py @@ -76,11 +76,12 @@ def generate_module_docs(): # add a link to the autodoc refs readme_str += f"\n[API Reference](../../../autoapi/{module.name}/index)\n" # create the module.type folder, use the first type just for where to store the file - type_folder = SAVE_FOLDER / module.type[0] - type_folder.mkdir(exist_ok=True) - with open(type_folder / f"{module.name}.md", "w") as f: - print("writing", SAVE_FOLDER) - f.write(readme_str) + for type in manifest['type']: + type_folder = SAVE_FOLDER / type + type_folder.mkdir(exist_ok=True) + with open(type_folder / f"{module.name}.md", "w") as f: + print("writing", SAVE_FOLDER) + f.write(readme_str) generate_index(modules_by_type) with open(SAVE_FOLDER / "configs_cheatsheet.md", "w") as f: