summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/conf.py2
-rw-r--r--docs/utils.py10
2 files changed, 8 insertions, 4 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 9aaa8eff..2fea7264 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -22,7 +22,7 @@ from docs import utils # noqa: E402
# -- Project information -----------------------------------------------------
-project = "Bot Core"
+project = "Pydis Core"
copyright = "2021, Python Discord"
author = "Python Discord"
diff --git a/docs/utils.py b/docs/utils.py
index ba6c8e34..3f58e767 100644
--- a/docs/utils.py
+++ b/docs/utils.py
@@ -160,9 +160,13 @@ def cleanup() -> None:
content = file.read_text(encoding="utf-8").splitlines(keepends=True)
# Rename the extension to be less wordy
- # Example: pydis_core.exts -> pydis_core Exts
- title = content[0].split()[0].strip().replace("pydis_core.", "").replace(".", " ").title()
- title = f"{title}\n{'=' * len(title)}\n\n"
+ # Example: pydis_core.exts -> Exts
+ title = content[0].split()[0].strip().replace("\\", "").replace("pydis_core.", "").replace(".", " ")
+ if "pydis_core" in title:
+ # Root title: pydis_core -> pydis core
+ title = title.replace("_", " ")
+
+ title = f"{title.title()}\n{'=' * len(title)}\n\n"
content = title, *content[3:]
file.write_text("".join(content), encoding="utf-8")