Authored-By: OpenAI (GPT-5) <noreply@openai.com>
This commit is contained in:
+5
-3
@@ -34,11 +34,11 @@ def build_static(site_dir, cfg):
|
||||
|
||||
elif cfg["type"] == "hugo":
|
||||
print(f"Building Hugo site from {src}")
|
||||
run(f"hugo --source {src} --destination {html_dir}")
|
||||
run(["hugo", "--source", str(src), "--destination", str(html_dir)])
|
||||
|
||||
elif cfg["type"] == "mkdocs":
|
||||
print(f"Building MkDocs site from {src}")
|
||||
run(f"cd {src} && mkdocs build -d {html_dir}")
|
||||
run(["mkdocs", "build", "-d", str(html_dir)], cwd=src)
|
||||
|
||||
if cfg.get("tidy", True):
|
||||
print("Running tidy on HTML files...")
|
||||
@@ -56,7 +56,9 @@ def build_static(site_dir, cfg):
|
||||
|
||||
def cmd_build():
|
||||
site_dir = Path(env("SITE_DIR"))
|
||||
cfg = parse_site_yaml(site_dir)
|
||||
site_repo = env("SITE_REPO", "")
|
||||
site_name = site_repo.split("/", 1)[1] if "/" in site_repo else None
|
||||
cfg = parse_site_yaml(site_dir, site_name)
|
||||
|
||||
if not cfg["enabled"]:
|
||||
print("Site disabled — skipping build")
|
||||
|
||||
Reference in New Issue
Block a user