merodi
A markdown-based static site generator.
git clone https://git.pi66.xyz/merodi
About | Files | Commits | Refs | License
fix: treat tree.plugins as a directory
Author: pi66
Date: 2026-07-15 00:10
commit: bb70c99a
Stat
| M | src/fileops.py | 2 | +1 | -1 |
| M | src/init_project.py | 5 | +3 | -2 |
Diff
diff --git a/src/fileops.py b/src/fileops.py
index 59ee1c2..396870f 100644
--- a/src/fileops.py
+++ b/src/fileops.py
@@ -29,4 +29,4 @@ def create_tree_dirs (tree:Tree) -> None:
makedirs(tree.static , exist_ok=True)
makedirs(tree.templates, exist_ok=True)
makedirs(tree.dest , exist_ok=True)
- makedirs(path.dirname(tree.plugins) ,exist_ok=True)
+ makedirs(tree.plugins , exist_ok=True)
diff --git a/src/init_project.py b/src/init_project.py
index 36c3529..62f3ba9 100644
--- a/src/init_project.py
+++ b/src/init_project.py
@@ -19,7 +19,7 @@ def init_config_struct(project_name:str) -> Config:
static = "src/static",
templates = "src/templates",
dest = "src/dest",
- plugins = "src/plugins.py",
+ plugins = "src/plugins",
...
Show all
Show less
diff --git a/src/fileops.py b/src/fileops.py
index 59ee1c2..396870f 100644
--- a/src/fileops.py
+++ b/src/fileops.py
@@ -29,4 +29,4 @@ def create_tree_dirs (tree:Tree) -> None:
makedirs(tree.static , exist_ok=True)
makedirs(tree.templates, exist_ok=True)
makedirs(tree.dest , exist_ok=True)
- makedirs(path.dirname(tree.plugins) ,exist_ok=True)
+ makedirs(tree.plugins , exist_ok=True)
diff --git a/src/init_project.py b/src/init_project.py
index 36c3529..62f3ba9 100644
--- a/src/init_project.py
+++ b/src/init_project.py
@@ -19,7 +19,7 @@ def init_config_struct(project_name:str) -> Config:
static = "src/static",
templates = "src/templates",
dest = "src/dest",
- plugins = "src/plugins.py",
+ plugins = "src/plugins",
...
diff --git a/src/fileops.py b/src/fileops.py
index 59ee1c2..396870f 100644
--- a/src/fileops.py
+++ b/src/fileops.py
@@ -29,4 +29,4 @@ def create_tree_dirs (tree:Tree) -> None:
makedirs(tree.static , exist_ok=True)
makedirs(tree.templates, exist_ok=True)
makedirs(tree.dest , exist_ok=True)
- makedirs(path.dirname(tree.plugins) ,exist_ok=True)
+ makedirs(tree.plugins , exist_ok=True)
diff --git a/src/init_project.py b/src/init_project.py
index 36c3529..62f3ba9 100644
--- a/src/init_project.py
+++ b/src/init_project.py
@@ -19,7 +19,7 @@ def init_config_struct(project_name:str) -> Config:
static = "src/static",
templates = "src/templates",
dest = "src/dest",
- plugins = "src/plugins.py",
+ plugins = "src/plugins",
),
webview = Webview(
host = "localhost",
@@ -79,7 +79,8 @@ def write_default_content(tree:Tree) -> None:
css_file = path.join(tree.static, "style.css")
write_file(css_file,CSS_CONTENT )
- write_file(tree.plugins,PLUGINS_CONTENT )
+ plugins_file = path.join(tree.plugins, "main.py")
+ write_file(plugins_file,PLUGINS_CONTENT )
def write_config_file(project_path, config_content):
makedirs(project_path, exist_ok=True)