Move config, content and templates to sites/

This commit is contained in:
Giuseppe Criscione 2020-12-16 18:14:49 +01:00
parent e75d546efa
commit 6e27db301f
29 changed files with 5 additions and 4 deletions

View File

@ -142,11 +142,11 @@ final class Formwork
'date.week_starts' => 0,
'languages.available' => [],
'languages.http_preferred' => false,
'content.path' => ROOT_PATH . 'content' . DS,
'content.path' => SITE_PATH . 'content' . DS,
'content.extension' => '.md',
'files.allowed_extensions' => ['.jpg', '.jpeg', '.png', '.gif', '.svg', '.webp', '.pdf'],
'parsers.use_php_yaml' => 'parse',
'templates.path' => ROOT_PATH . 'templates' . DS,
'templates.path' => SITE_PATH . 'templates' . DS,
'templates.extension' => '.php',
'pages.index' => 'index',
'pages.error' => '404',

View File

@ -125,7 +125,7 @@ class Template
}
return $this->assets = new Assets(
$this->path() . 'assets' . DS,
Formwork::instance()->site()->uri('/templates/assets/', false)
Formwork::instance()->site()->uri('/site/templates/assets/', false)
);
}

View File

@ -5,7 +5,8 @@ use Formwork\Core\Formwork;
const DS = DIRECTORY_SEPARATOR;
const ROOT_PATH = __DIR__ . DS;
const FORMWORK_PATH = ROOT_PATH . 'formwork' . DS;
const CONFIG_PATH = ROOT_PATH . 'config' . DS;
const SITE_PATH = ROOT_PATH . 'site' . DS;
const CONFIG_PATH = SITE_PATH . 'config' . DS;
const ADMIN_PATH = ROOT_PATH . 'admin' . DS;
require ROOT_PATH . 'vendor' . DS . 'autoload.php';