Skip to content

Commit 8136187

Browse files
Make docs file structure more docusaurus-friendly (#63)
* Make docs file structure more docusaurus-friendly * Update scripts.py Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 36786dc commit 8136187

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def generate_docusaurus():
141141
content = f.read_text(encoding="utf-8")
142142
safe_content = clean_mdx_content(content)
143143
rel_path = f.relative_to(input)
144-
dest_path = out / rel_path.with_suffix(".md")
144+
dest_path = out / rel_path.parent / rel_path.stem / "index.md"
145145
dest_path.parent.mkdir(parents=True, exist_ok=True)
146146

147147
dest_path.write_text(safe_content, encoding="utf-8")

templates/docusaurus/module.html.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{% if module.submodules %}
1818
## Submodules
1919
{% for submodule in module.submodules if is_public(submodule) | trim %}
20-
- [{{ submodule.name }}](./{{ submodule.name }})
20+
- [{{ submodule.name }}]({{ module.name }}/{{ submodule.name }})
2121
{% endfor %}
2222
{% endif %}
2323
{% endblock %}

0 commit comments

Comments
 (0)