diff --git a/classes.py b/classes.py index 4412497..a4a973b 100644 --- a/classes.py +++ b/classes.py @@ -113,7 +113,8 @@ class Site: def map_categories(self): for content_item in self.content_items: for category in content_item.data.get("categories"): - self.categories[category].append(content_item.slug) + if not category == "default": + self.categories[category].append(content_item.slug) print(self.categories) def build(self): @@ -142,13 +143,9 @@ class Site: # Build categories map self.map_categories() - for category in self.categories: - with (self.output_dir / "categories.html").open(mode="w", encoding="utf-8") as f: - f.write(categories_index_template.render(page_title = Config.MAIN_PAGE_TITLE, categories_list = self.categories)) - # Render the index file with (self.output_dir / "index.html").open("w", encoding="utf-8") as f: - f.write(index_template.render(page_title = Config.MAIN_PAGE_TITLE, content_items=self.content_items)) + f.write(index_template.render(page_title = Config.MAIN_PAGE_TITLE, content_items=self.content_items, categories = self.categories)) # Render the about file about_content = ContentItem(Path('static/about.md')) diff --git a/templates/default.html b/templates/default.html index 470ef39..c062bc0 100644 --- a/templates/default.html +++ b/templates/default.html @@ -84,6 +84,12 @@ - {% block footer_includes %} - {% endblock %} + +
Page created with microgen