layout updates

This commit is contained in:
anarsec 2023-07-11 16:52:07 +00:00
parent 337f615dd3
commit 849dc2dfb5
No known key found for this signature in database
5 changed files with 56 additions and 35 deletions

View file

@ -101,8 +101,9 @@ class Converter:
description = description_txt_path.open().read()
# Copy the front image
front_image = pathlib.Path(workingDirectory) / ("front_image" + pathlib.Path(toml_front_matter['extra']['blogimage']).suffix)
shutil.copy(self.anarsec_root / "static" / toml_front_matter['extra']['blogimage'].removeprefix("/"), front_image)
blogimageid = "blogimagepng" if "blogimagepng" in toml_front_matter["extra"] else "blogimage"
front_image = pathlib.Path(workingDirectory) / ("front_image" + pathlib.Path(toml_front_matter['extra'][blogimageid]).suffix)
shutil.copy(self.anarsec_root / "static" / toml_front_matter['extra'][blogimageid].removeprefix("/"), front_image)
# Copy the back image
back_image = pathlib.Path(workingDirectory) / "back_image.png"
@ -160,6 +161,7 @@ class Converter:
lastediteddate: "{toml_front_matter["extra"]["dateedit"]}",
description: "{description}",
subtitle: "{toml_front_matter.get("description")}",
category: "{toml_front_matter["taxonomies"]["categories"][0]}",
content
)
{typst_path.open().read()}