This commit is contained in:
anarsec 2024-11-23 12:40:44 -05:00
parent cf2025b3a6
commit 7546c90696
No known key found for this signature in database
11 changed files with 77 additions and 72 deletions

View file

@ -163,7 +163,12 @@ class Converter:
markdown_content += "\n\n# Annexe: Glossaire\n\n"
for entry, entry_content in glossary.items():
if entry in glossary_entries:
markdown_content += f"## {entry_content[0]}\n\n{entry_content[1]}\n\n"
markdown_content += f"""
```{{=typst}}
== {entry_content[0]} <{slugify.slugify(entry_content[0])}>
```
"""
markdown_content += f"\n\n{entry_content[1]}\n\n"
# Write the Markdown content to a file
input_markdown_path = pathlib.Path(workingDirectory) / f"{self.post_id}-markdown.md"
@ -179,7 +184,7 @@ class Converter:
# Convert the series markdown to typst
series_typst_path = pathlib.Path(workingDirectory) / f"series.typ"
subprocess.check_call([str(self.pandoc_binary), "-f", "markdown", "-t", "typst", "--columns", "999999", "-o", series_typst_path, series_markdown_path])
subprocess.check_call([str(self.pandoc_binary), "-f", "markdown+raw_attribute", "-t", "typst", "--columns", "999999", "-o", series_typst_path, series_markdown_path])
# mutlilingual categories
category = toml_front_matter["taxonomies"]["categories"][0]