Skip to content

Commit a7e908a

Browse files
Clean Up Formatting Of Project Name In Docs
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
1 parent 2b6fe6e commit a7e908a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# -- Project information -----------------------------------------------------
2424

25-
project = "Bot Core"
25+
project = "Pydis Core"
2626
copyright = "2021, Python Discord"
2727
author = "Python Discord"
2828

docs/utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,13 @@ def cleanup() -> None:
160160
content = file.read_text(encoding="utf-8").splitlines(keepends=True)
161161

162162
# Rename the extension to be less wordy
163-
# Example: pydis_core.exts -> pydis_core Exts
164-
title = content[0].split()[0].strip().replace("pydis_core.", "").replace(".", " ").title()
165-
title = f"{title}\n{'=' * len(title)}\n\n"
163+
# Example: pydis_core.exts -> Exts
164+
title = content[0].split()[0].strip().replace("\\", "").replace("pydis_core.", "").replace(".", " ")
165+
if "pydis_core" in title:
166+
# Root title: pydis_core -> pydis core
167+
title = title.replace("_", " ")
168+
169+
title = f"{title.title()}\n{'=' * len(title)}\n\n"
166170
content = title, *content[3:]
167171

168172
file.write_text("".join(content), encoding="utf-8")

0 commit comments

Comments
 (0)