diff --git a/compiler/docs/compiler.py b/compiler/docs/compiler.py index 99b556f4..af9d1315 100644 --- a/compiler/docs/compiler.py +++ b/compiler/docs/compiler.py @@ -85,18 +85,21 @@ def generate(source_path, base): if k != base: inner_path = base + "/" + k + "/index" + ".rst" + module = "pyrogram.api.{}.{}".format(base, k) else: for i in list(all_entities)[::-1]: if i != base: entities.insert(0, "{0}/index".format(i)) inner_path = base + "/index" + ".rst" + module = "pyrogram.api.{}".format(base) with open(destination + "/" + inner_path, "w") as f: f.write( toctree.format( title=k.title(), title_markup="=" * len(k), + module=module, entities="\n ".join(entities) ) ) diff --git a/compiler/docs/template/toctree.txt b/compiler/docs/template/toctree.txt index e2ba0696..717276c4 100644 --- a/compiler/docs/template/toctree.txt +++ b/compiler/docs/template/toctree.txt @@ -1,5 +1,7 @@ {title} {title_markup} +.. module:: {module} + .. toctree:: {entities} \ No newline at end of file