Change configuration format

This commit is contained in:
Stéphane Goetz
2015-07-19 16:36:34 +02:00
parent f757e88040
commit c00dfac001
12 changed files with 94 additions and 68 deletions

View File

@ -58,7 +58,9 @@ class Builder
{
$name = DauxHelper::pathinfo($path)['filename'];
if (!in_array(pathinfo($path, PATHINFO_EXTENSION), Daux::$VALID_MARKDOWN_EXTENSIONS)) {
$config = $parent->getConfig();
if (!in_array(pathinfo($path, PATHINFO_EXTENSION), $config['valid_content_extensions'])) {
$entry = new Raw($parent, static::getUriFromFilename(static::getFilename($path)), $path, filemtime($path));
$entry->setTitle(static::getTitleFromFilename($name));
$entry->setName($name);
@ -66,8 +68,6 @@ class Builder
return $entry;
}
$config = $parent->getConfig();
$uri = static::getUriFromFilename($name);
if ($config['mode'] === Daux::STATIC_MODE) {
$uri .= '.html';