diff --git a/routes/index.php b/routes/index.php index 6b16386..622db55 100644 --- a/routes/index.php +++ b/routes/index.php @@ -20,7 +20,7 @@ function getApi(array $proxy_elements): \Sovit\TikTok\Api { function getLatte(): \Latte\Engine { $subdir = getSubdir(); $latte = new Latte\Engine; - $latte->setTempDirectory('./cache/views'); + $latte->setTempDirectory(__DIR__ . '/../cache/views'); $latte->addFunction('assets', function (string $name, string $type) use ($subdir) { $path = "{$subdir}/{$type}/{$name}"; return $path; @@ -33,7 +33,7 @@ function getLatte(): \Latte\Engine { } function getView(string $template): string { - return "./views/{$template}.latte"; + return __DIR__ . "/../views/{$template}.latte"; } Route::add('/', function () { diff --git a/views/components/head.latte b/views/components/head.latte index 1268bac..7ffcea4 100644 --- a/views/components/head.latte +++ b/views/components/head.latte @@ -3,5 +3,5 @@ -