This commit is contained in:
2023-10-04 13:32:30 +03:00
parent 215d238505
commit 1ca5f4e521
82 changed files with 519 additions and 1889 deletions
+2 -5
View File
@@ -14,7 +14,7 @@ class StaticGenerator
$filepath = public_path($path . "/index.html");
if (!file_exists(pathinfo($filepath, PATHINFO_DIRNAME))) {
$this->make_dir(pathinfo($filepath, PATHINFO_DIRNAME));
make_dir_r(pathinfo($filepath, PATHINFO_DIRNAME));
}
file_put_contents($filepath, $html);
@@ -35,8 +35,5 @@ class StaticGenerator
return 0;
}
private function make_dir(string $path): void
{
is_dir($path) || mkdir($path, 0777, true);
}
}