Pi66

merodi
A markdown-based static site generator.
git clone https://git.pi66.xyz/merodi

← back to log

feat: enable extended Markdown support

author: pi66
date: 2026-06-25 17:42
hash: e0b278471494139c193e6b5820b998a1faec2b94

Diffstat:

M

src/build.py
9 +++++++++++++++++++++++++++---
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/build.py b/src/build.py
index a868837..77b96b0 100644
--- a/src/build.py
+++ b/src/build.py
@@ -57,7 +57,14 @@ def compile_md_to_html(md_file:str, html_dest:str, config =None):
     """Convert a Markdown file to HTML, applying filters and Jinja2 processing, and save to dest."""
     info(f"Building {GRAY(md_file)}...")
     md_content = read_file(md_file)
-    raw_html_content = markdown(md_content)
+    raw_html_content = markdown(
+        md_content,
+        extensions=[
+            "extra",
+            "toc",
+            "codehilite",
+        ]
+    )
     filtered_html = html_filter(raw_html_content)
     html_content = jinja_handler(md_file, filtered_html, config)
     save_html(html_content, html_dest)