From 4208626262d6cf790da1c0e00765b375fa427aa7 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Thu, 1 Apr 2021 16:29:29 +0800 Subject: Place category pages in the same directory as categories. --- pydis_site/apps/content/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pydis_site/apps/content/utils.py') diff --git a/pydis_site/apps/content/utils.py b/pydis_site/apps/content/utils.py index d6886ce2..d3f270ff 100644 --- a/pydis_site/apps/content/utils.py +++ b/pydis_site/apps/content/utils.py @@ -32,7 +32,8 @@ def get_category_pages(path: Path) -> Dict[str, Dict]: pages = {} for item in path.glob("*.md"): - if item.is_file(): + # Only list page if there is no category with the same name + if item.is_file() and not item.with_suffix("").is_dir(): pages[item.stem] = frontmatter.load(item).metadata return pages -- cgit v1.2.3