Pi66

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

← back to log

feat: use default highlight config for --file builds

author: pi66
date: 2026-06-27 11:52
hash: d20cc7aa713574575a6606079ed23dba93928cc3

Diffstat:

M

src/build.py
3 ++++++++++++++++++++----------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/build.py b/src/build.py
index 4a7edf1..6dc50f7 100644
--- a/src/build.py
+++ b/src/build.py
@@ -12,6 +12,7 @@ from .config import find_project_from_path, load_extras_config, load_tree_config
 from .errors import fatal, html_fatal
 from .fileops import read_file, write_file
 from .log import GRAY, info
+from .modules import Extras

 # patch [ ] instead of { }
 AttrListTreeprocessor.BASE_RE   = r'\[\:?[ ]*([^\]\n ][^\n]*)[ ]*\]'
@@ -121,7 +122,7 @@ def build(building_type:str,project_path:str, file:list[str]):
                 raise ValueError("A file path must include exactly a source and a destination.")

             else:
-                compile_md_to_html(file[0], file[1].removesuffix(".md") + ".html")
+                compile_md_to_html(file[0], file[1].removesuffix(".md") + ".html", extras_config=Extras(highlight="monokai"))
                 return

         else: