| Summary | Provides paths under a specified directory that match a certain pattern |
|---|---|
| Short name | file_system |
| Provided by bundle | built-in |
| API doc | Webgen::Source::FileSystem |
Description
This source extension creates source paths for all files/directories that match a certain pattern under a specific directory.
Usage
When using this source, the first parameter is the directory under which the to-be-used files are
located. The directory is taken relative to the website directory. The second, optional, parameter
specifies a path pattern (see Path Patterns and Dir.glob).
The default value for the path pattern is **/* which matches all files/directories under the given
root directory.
This is the default source used when creating a new webgen website.
Examples
The used sources can be specified via the sources configuration option, so each of the examples below can directly be used in the configuration file.
-
All files under the
srcdirectory of the website directory are used (the default configuration):sources: [[/, file_system, src]] -
The default configuration and additionally all files under a
miscdirectory:sources: - [/, file_system, src] - [/, file_system, misc] -
The default configuration and additionally mounting all images from an absolutely specified directory under the
/images/directory:sources: - [/, file_system, src] - [/images/, file_system, /media/storage/pictures, **/*.jpg]