aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/utils.py
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2021-03-24 14:14:43 +0800
committerGravatar kosayoda <[email protected]>2021-03-24 14:14:43 +0800
commitdbac69c7a58938fb24128a787971ea1bc1892110 (patch)
tree7926d90cf2c9954b6dcfdafdbe0677c30f7a8377 /pydis_site/apps/content/utils.py
parentRefactor common HTML into a base template. (diff)
Improve variable and key names for page utils.
Diffstat (limited to 'pydis_site/apps/content/utils.py')
-rw-r--r--pydis_site/apps/content/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py
index 6cb15581..8cbcad91 100644
--- a/pydis_site/apps/content/utils.py
+++ b/pydis_site/apps/content/utils.py
@@ -25,8 +25,8 @@ def get_categories(path: Path) -> Dict[str, Dict]:
return categories
-def get_pages(path: Path) -> Dict[str, Dict]:
- """Get all root or category page names and their metadata."""
+def get_category_pages(path: Path) -> Dict[str, Dict]:
+ """Get all page names and their metadata at a category path."""
pages = {}
for item in path.iterdir():
@@ -56,4 +56,4 @@ def get_page(path: Path) -> Dict[str, Union[str, Dict]]:
]
)
- return {"page": str(html), "metadata": html.metadata}
+ return {"content": str(html), "metadata": html.metadata}