PHP Class Yosymfony\Spress\Core\DataSource\Filesystem\FilesystemDataSource
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.
Show file
Open project: spress/spress
Class Usage Examples
Public Methods
Private Methods
Method Details
getIncludes()
public method
getLayouts()
public method