|
|
|
@ -717,6 +717,13 @@ class Pico |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$id = substr($file, strlen($this->getConfig('content_dir')), -strlen($this->getConfig('content_ext'))); |
|
|
|
|
|
|
|
|
|
// drop inaccessible pages (e.g. drop "sub.md" if "sub/index.md" exists) |
|
|
|
|
$conflictFile = $this->getConfig('content_dir') . $id . '/index' . $this->getConfig('content_ext'); |
|
|
|
|
if (in_array($conflictFile, $files, true)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$url = $this->getPageUrl($id); |
|
|
|
|
if ($file != $this->requestFile) { |
|
|
|
|
$rawContent = file_get_contents($file); |
|
|
|
@ -726,13 +733,6 @@ class Pico |
|
|
|
|
$meta = &$this->meta; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// drop inaccessible pages (e.g. drop "sub.md" if "sub/index.md" exists) |
|
|
|
|
if (substr($id, -6) === '/index') { |
|
|
|
|
unset($pages[dirname($id)]); |
|
|
|
|
} elseif (isset($pages[$id . '/index'])) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// build page data |
|
|
|
|
// title, description, author and date are assumed to be pretty basic data |
|
|
|
|
// everything else is accessible through $page['meta'] |
|
|
|
|