Pārlūkot izejas kodu

Search for content/index.md to determine the content dir to use

Daniel Rudolf 8 gadi atpakaļ
vecāks
revīzija
1d73524e41
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      lib/Pico.php

+ 2 - 2
lib/Pico.php

@@ -761,9 +761,9 @@ class Pico
 
 
         if (!$this->config['content_dir']) {
         if (!$this->config['content_dir']) {
             // try to guess the content directory
             // try to guess the content directory
-            if (is_dir($this->getRootDir() . 'content')) {
+            if (is_file($this->getRootDir() . 'content/index' . $this->config['content_ext'])) {
                 $this->config['content_dir'] = $this->getRootDir() . 'content/';
                 $this->config['content_dir'] = $this->getRootDir() . 'content/';
-            } elseif (is_dir($this->getRootDir() . 'content-sample')) {
+            } elseif (is_file($this->getRootDir() . 'content-sample/index' . $this->config['content_ext'])) {
                 $this->config['content_dir'] = $this->getRootDir() . 'content-sample/';
                 $this->config['content_dir'] = $this->getRootDir() . 'content-sample/';
             } else {
             } else {
                 $this->config['content_dir'] = $this->getVendorDir() . 'content-sample/';
                 $this->config['content_dir'] = $this->getVendorDir() . 'content-sample/';