diff --git a/meshchatx/src/backend/docs_manager.py b/meshchatx/src/backend/docs_manager.py
index 3a0e150..09afd66 100644
--- a/meshchatx/src/backend/docs_manager.py
+++ b/meshchatx/src/backend/docs_manager.py
@@ -221,6 +221,7 @@ class DocsManager:
return
try:
+ index_links: list[str] = []
for file, src_docs in sourced:
src_path = os.path.join(src_docs, file)
dest_path = os.path.join(self.meshchatx_docs_dir, file)
@@ -259,8 +260,38 @@ class DocsManager:
encoding="utf-8",
) as f:
f.write(full_html)
+ index_links.append(
+ f'
{html_file}'
+ )
except Exception as e:
logging.exception(f"Failed to render {file} to HTML: {e}")
+
+ # Generate an index.html so /meshchatx-docs/index.html resolves
+ if index_links and os.access(self.meshchatx_docs_dir, os.W_OK):
+ index_html = f"""
+
+
+
+
+ MeshChatX Documentation
+
+
+
+
+ MeshChatX Documentation
+
+ {''.join(index_links)}
+
+
+"""
+ with open(
+ os.path.join(self.meshchatx_docs_dir, "index.html"),
+ "w",
+ encoding="utf-8",
+ ) as f:
+ f.write(index_html)
except Exception as e:
logging.exception(f"Failed to populate MeshChatX docs: {e}")