From a40f650fc9d5f7811e61f97831d45ba8d4a7371a Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 18 Dec 2025 15:32:26 +0100 Subject: [PATCH 1/2] Make docs file structure more docusaurus-friendly --- scripts.py | 2 +- templates/docusaurus/module.html.jinja2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts.py b/scripts.py index 625d8db..402bf86 100644 --- a/scripts.py +++ b/scripts.py @@ -141,7 +141,7 @@ def generate_docusaurus(): content = f.read_text(encoding="utf-8") safe_content = clean_mdx_content(content) rel_path = f.relative_to(input) - dest_path = out / rel_path.with_suffix(".md") + dest_path = out / rel_path.with_suffix("") / "index.md" dest_path.parent.mkdir(parents=True, exist_ok=True) dest_path.write_text(safe_content, encoding="utf-8") diff --git a/templates/docusaurus/module.html.jinja2 b/templates/docusaurus/module.html.jinja2 index 8033247..d22edfc 100644 --- a/templates/docusaurus/module.html.jinja2 +++ b/templates/docusaurus/module.html.jinja2 @@ -17,7 +17,7 @@ {% if module.submodules %} ## Submodules {% for submodule in module.submodules if is_public(submodule) | trim %} -- [{{ submodule.name }}](./{{ submodule.name }}) +- [{{ submodule.name }}]({{ module.name }}/{{ submodule.name }}) {% endfor %} {% endif %} {% endblock %} From 20cb5c3d0efd6dc5b33d33eae900cbba58b7274a Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 18 Dec 2025 15:52:45 +0100 Subject: [PATCH 2/2] Update scripts.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts.py b/scripts.py index 402bf86..12dc4f7 100644 --- a/scripts.py +++ b/scripts.py @@ -141,7 +141,7 @@ def generate_docusaurus(): content = f.read_text(encoding="utf-8") safe_content = clean_mdx_content(content) rel_path = f.relative_to(input) - dest_path = out / rel_path.with_suffix("") / "index.md" + dest_path = out / rel_path.parent / rel_path.stem / "index.md" dest_path.parent.mkdir(parents=True, exist_ok=True) dest_path.write_text(safe_content, encoding="utf-8")