The directory separator is '/' in any case. Source-root structure: |- includes |- layouts |- plugins |- content | |- posts | |- index.html | |- ... The item's attributes (metas) will be loaded from a block located at the top of the each file (frontmatter) or from a separated metadata file. e.g: - index.html - index.html.meta <- metadata file with the attributes. Each item will automatically receive some extra attributes: - mtime: : modified time. - filename : the name of the file. - extension : the extension of item's filename. If the filename is a date filename, a filename that matched a patter yyyy-mm-dd-title.extension, receive some extra attributes: - title - title_path - date If the filename is located in a subfolder of "posts/" receive an extra attribute "categories". Params: - source_root (string): the root directory. - include (array): force to include files or directories. e.g:"/tmp/files". - exclude (array): force to exclude files or directories. e.g: "post". - text_extensions (array): extension of the files considered as text files. e.g: "html". - attribute_syntax (string): syntax for describing attributes: "yaml" or "json". "yaml" by default. - avoid_renderizer_path (array): the files belong to declared path will have set up avoid_renderizer to true. - avoid_renderizer_extension (array): the filenames with an extension belong to declared will have set up avoid_renderizer to true.
Author: Victor Puertas (vpgugr@gmail.com)
Inheritance: extends Yosymfony\Spress\Core\DataSource\AbstractDataSource
 /**
  * @expectedException \Yosymfony\Spress\Core\ContentManager\Exception\AttributeValueException
  */
 public function testBadParamExclude()
 {
     $fsDataSource = new FilesystemDataSource(['source_root' => $this->sourcePath, 'exclude' => './', 'text_extensions' => $this->textExtensions]);
     $fsDataSource->load();
 }
示例#2
0
 /**
  * @expectedException \Yosymfony\Spress\Core\Exception\AttributeValueException
  */
 public function testBadParamExclude()
 {
     $fsDataSource = new FilesystemDataSource(['source_root' => __DIR__ . '/../../fixtures/project/src', 'exclude' => './', 'text_extensions' => $this->textExtensions]);
     $fsDataSource->load();
 }