Pi66

Home | Repos | About | Blog | Gaza

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

About | Files | Commits | Refs | License


refactor: rename config to tree_config in build.py for clarity

Author: pi66
Date: 2026-06-27 11:15
commit: 2f30734e

Stat

M src/build.py 8 +4 -4

Diff

diff --git a/src/build.py b/src/build.py
index 7e7c45c..03b1716 100644
--- a/src/build.py
+++ b/src/build.py
@@ -117,15 +117,15 @@ def build(building_type:str,project_path:str, file:list[str]):
         else:
             project_path = project_path if project_path else getcwd()
             find_project_from_path(project_path)
-            config  = load_tree_config(project_path)
-            md_path = config.markdown
+            tree_config  = load_tree_config(project_path)
+            md_path = tree_config.markdown
         for parent, _, files  in walk(md_path):
             for filename in files:
                 md_file = path.join(parent, filename)
                 md_relpath = path.relpath(md_file,md_path)

- html_dest = path.join(config.dest, md_relpath).removesuffix(".md") + ".html" - compile_md_to_html(md_file, html_dest, config) + html_dest = path.join(tree_config.dest, md_relpath).removesuffix(".md") + ".html" ...

Show all

diff --git a/src/build.py b/src/build.py
index 7e7c45c..03b1716 100644
--- a/src/build.py
+++ b/src/build.py
@@ -117,15 +117,15 @@ def build(building_type:str,project_path:str, file:list[str]):
         else:
             project_path = project_path if project_path else getcwd()
             find_project_from_path(project_path)
-            config  = load_tree_config(project_path)
-            md_path = config.markdown
+            tree_config  = load_tree_config(project_path)
+            md_path = tree_config.markdown
         for parent, _, files  in walk(md_path):
             for filename in files:
                 md_file = path.join(parent, filename)
                 md_relpath = path.relpath(md_file,md_path)

- html_dest = path.join(config.dest, md_relpath).removesuffix(".md") + ".html" - compile_md_to_html(md_file, html_dest, config) + html_dest = path.join(tree_config.dest, md_relpath).removesuffix(".md") + ".html" + compile_md_to_html(md_file, html_dest, tree_config)

 except Exception as e:
     fatal(e, f"Build failed: {e}")

// Created by Pi66

// Copyright ©Pi66 2026