This commit is contained in:
SG
2025-06-16 22:11:24 +03:00
parent 7d81226d83
commit 0583eb07ee
3 changed files with 36 additions and 42 deletions

View File

@@ -47,7 +47,7 @@ class ContentItem:
logger.debug(f"Copying {self.js_file} to {js_targetfile}")
shutil.copyfile(self.js_file, js_targetfile)
with self.target_file.open("w", encoding="utf-8") as f:
f.write(content_item_template.render(content_item = self, page_title = self.title, parent_path = '../', categories = categories))
f.write(content_item_template.render(content_item = self, page_title = f"{Config.MAIN_PAGE_TITLE}: {self.title}", parent_path = '../', categories = categories))
except Exception as e:
logger.error(f"Renderer: {e}")
@@ -175,7 +175,7 @@ class Site:
category_index = Path(f"{self.output_dir}/categories/{category}.html")
category_items = [i for i in visible_content_items if category in i.data.get("categories")]
with (category_index).open(mode="w", encoding="utf-8") as f:
f.write(index_template.render(page_title=category, content_items=category_items, categories = self.categories, parent_path = '../'))
f.write(index_template.render(page_title=f"{Config.MAIN_PAGE_TITLE}: {category}", content_items=category_items, categories = self.categories, parent_path = '../'))
logger.info(f"Created {len(self.content_items)} content items.")