@@ -141,8 +141,8 @@ |
||
| 141 | 141 | case PageType::TERM: |
| 142 | 142 | $layouts = [ |
| 143 | 143 | // "taxonomy/$term.$format.$ext", // ie: taxonomy/velo.html.twig |
| 144 | - "_default/term.$format.$ext", // ie: _default/term.html.twig |
|
| 145 | - "_default/list.$format.$ext", // ie: _default/list.html.twig |
|
| 144 | + "_default/term.$format.$ext", // ie: _default/term.html.twig |
|
| 145 | + "_default/list.$format.$ext", // ie: _default/list.html.twig |
|
| 146 | 146 | ]; |
| 147 | 147 | if ($page->hasVariable('term')) { |
| 148 | 148 | $layouts = array_merge( |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | $this->options = array_merge([ |
| 133 | 133 | 'drafts' => false, // build drafts or not |
| 134 | 134 | 'dry-run' => false, // if dry-run is true, generated files are not saved |
| 135 | - 'page' => '', // specific page to build |
|
| 135 | + 'page' => '', // specific page to build |
|
| 136 | 136 | ], $options); |
| 137 | 137 | |
| 138 | 138 | // process each step |
@@ -61,8 +61,8 @@ |
||
| 61 | 61 | |
| 62 | 62 | // handles options |
| 63 | 63 | $canonical = null; // if true, add prefix URL with baseurl |
| 64 | - $format = null; // set output format |
|
| 65 | - $language = null; // force language |
|
| 64 | + $format = null; // set output format |
|
| 65 | + $language = null; // force language |
|
| 66 | 66 | extract(is_array($options) ? $options : [], EXTR_IF_EXISTS); |
| 67 | 67 | |
| 68 | 68 | // canonical URL? |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | $staticFiles[$count]['exif'] = Util\File::readExif($file->getRealPath()); |
| 79 | 79 | } |
| 80 | 80 | if ($type == 'audio') { |
| 81 | - $staticFiles[$count]['audio'] = new Mp3Info($file->getRealPath()); |
|
| 81 | + $staticFiles[$count]['audio'] = new Mp3Info($file->getRealPath()); |
|
| 82 | 82 | } |
| 83 | 83 | $count++; |
| 84 | 84 | |
@@ -78,22 +78,22 @@ |
||
| 78 | 78 | } |
| 79 | 79 | }); |
| 80 | 80 | $this->data = [ |
| 81 | - 'file' => '', // absolute file path |
|
| 82 | - 'files' => [], // array of files path (if bundle) |
|
| 83 | - 'filename' => '', // filename |
|
| 84 | - 'path_source' => '', // public path to the file, before transformations |
|
| 85 | - 'path' => '', // public path to the file, after transformations |
|
| 86 | - 'url' => null, // URL of a remote image |
|
| 81 | + 'file' => '', // absolute file path |
|
| 82 | + 'files' => [], // array of files path (if bundle) |
|
| 83 | + 'filename' => '', // filename |
|
| 84 | + 'path_source' => '', // public path to the file, before transformations |
|
| 85 | + 'path' => '', // public path to the file, after transformations |
|
| 86 | + 'url' => null, // URL of a remote image |
|
| 87 | 87 | 'missing' => false, // if file not found, but missing ollowed 'missing' is true |
| 88 | - 'ext' => '', // file extension |
|
| 89 | - 'type' => '', // file type (e.g.: image, audio, video, etc.) |
|
| 90 | - 'subtype' => '', // file media type (e.g.: image/png, audio/mp3, etc.) |
|
| 91 | - 'size' => 0, // file size (in bytes) |
|
| 92 | - 'content_source' => '', // file content, before transformations |
|
| 93 | - 'content' => '', // file content, after transformations |
|
| 94 | - 'width' => 0, // width (in pixels) in case of an image |
|
| 95 | - 'height' => 0, // height (in pixels) in case of an image |
|
| 96 | - 'exif' => [], // exif data |
|
| 88 | + 'ext' => '', // file extension |
|
| 89 | + 'type' => '', // file type (e.g.: image, audio, video, etc.) |
|
| 90 | + 'subtype' => '', // file media type (e.g.: image/png, audio/mp3, etc.) |
|
| 91 | + 'size' => 0, // file size (in bytes) |
|
| 92 | + 'content_source' => '', // file content, before transformations |
|
| 93 | + 'content' => '', // file content, after transformations |
|
| 94 | + 'width' => 0, // width (in pixels) in case of an image |
|
| 95 | + 'height' => 0, // height (in pixels) in case of an image |
|
| 96 | + 'exif' => [], // exif data |
|
| 97 | 97 | ]; |
| 98 | 98 | |
| 99 | 99 | // handles options |
@@ -18,12 +18,12 @@ discard block |
||
| 18 | 18 | 'baseurl' => 'http://localhost:8000/', |
| 19 | 19 | 'canonicalurl' => false, // if true then `url()` function prepends URL with `baseurl` |
| 20 | 20 | 'description' => 'Site description', |
| 21 | - 'taxonomies' => [ // default taxonomies |
|
| 21 | + 'taxonomies' => [// default taxonomies |
|
| 22 | 22 | 'tags' => 'tag', // can be disabled with the special "disabled" value |
| 23 | 23 | 'categories' => 'category', |
| 24 | 24 | ], |
| 25 | 25 | 'pagination' => [ |
| 26 | - 'max' => 5, // number of pages by each paginated pages |
|
| 26 | + 'max' => 5, // number of pages by each paginated pages |
|
| 27 | 27 | 'path' => 'page', // path to paginated pages (e.g.: `/blog/page/2/`) |
| 28 | 28 | ], |
| 29 | 29 | //'date' => [ |
@@ -46,17 +46,17 @@ discard block |
||
| 46 | 46 | 'format' => 'yaml', // front matter format: `yaml`, `ini`, `toml` or `json` (`yaml` by default) |
| 47 | 47 | ], |
| 48 | 48 | 'body' => [ |
| 49 | - 'format' => 'md', // page body format (only Markdown is supported) |
|
| 49 | + 'format' => 'md', // page body format (only Markdown is supported) |
|
| 50 | 50 | 'toc' => ['h2', 'h3'], // headers used to build the table of contents |
| 51 | 51 | 'highlight' => [ |
| 52 | - 'enabled' => false, // enables code syntax highlighting (`false` by default) |
|
| 52 | + 'enabled' => false, // enables code syntax highlighting (`false` by default) |
|
| 53 | 53 | ], |
| 54 | 54 | 'images' => [ |
| 55 | 55 | 'lazy' => [ |
| 56 | - 'enabled' => true, // adds `loading="lazy"` attribute (`true` by default) |
|
| 56 | + 'enabled' => true, // adds `loading="lazy"` attribute (`true` by default) |
|
| 57 | 57 | ], |
| 58 | 58 | 'decoding' => [ |
| 59 | - 'enabled' => true, // adds `decoding="async"` attribute (`true` by default) |
|
| 59 | + 'enabled' => true, // adds `decoding="async"` attribute (`true` by default) |
|
| 60 | 60 | ], |
| 61 | 61 | 'resize' => [ |
| 62 | 62 | 'enabled' => false, // enables image resizing by using the `width` extra attribute (`false` by default) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'responsive' => [ |
| 68 | 68 | 'enabled' => false, // creates responsive images and adds them to the `srcset` attribute (`false` by default) |
| 69 | 69 | ], |
| 70 | - 'class' => '', // puts default CSS class to each image (empty by default) |
|
| 70 | + 'class' => '', // puts default CSS class to each image (empty by default) |
|
| 71 | 71 | 'caption' => [ |
| 72 | 72 | 'enabled' => false, // puts the image in a <figure> element and adds a <figcaption> containing the title (`false` by default) |
| 73 | 73 | ], |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | 'enabled' => true, // turns remote images to Asset to handling them (`true` by default) |
| 76 | 76 | 'fallback' => [ |
| 77 | 77 | 'enabled' => false, // enables a fallback if image is not found (`false` by default) |
| 78 | - 'path' => '', // path to the fallback image, stored in assets dir (empty by default) |
|
| 78 | + 'path' => '', // path to the fallback image, stored in assets dir (empty by default) |
|
| 79 | 79 | ], |
| 80 | 80 | ], |
| 81 | 81 | ], |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | ], |
| 93 | 93 | 'excerpt' => [ |
| 94 | 94 | 'separator' => 'excerpt|break', // string to use as separator (`excerpt|break` by default) |
| 95 | - 'capture' => 'before', // part to capture, `before` or `after` the separator (`before` by default) |
|
| 95 | + 'capture' => 'before', // part to capture, `before` or `after` the separator (`before` by default) |
|
| 96 | 96 | ], |
| 97 | 97 | ], |
| 98 | - 'generators' => [ // list of pages generators, ordered by weight |
|
| 98 | + 'generators' => [// list of pages generators, ordered by weight |
|
| 99 | 99 | 10 => 'Cecil\Generator\DefaultPages', |
| 100 | 100 | 20 => 'Cecil\Generator\VirtualPages', |
| 101 | 101 | 30 => 'Cecil\Generator\ExternalBody', |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | 90 => 'Cecil\Generator\Redirect', |
| 108 | 108 | ], |
| 109 | 109 | ], |
| 110 | - 'defaultpages' => [ // default generated pages |
|
| 110 | + 'defaultpages' => [// default generated pages |
|
| 111 | 111 | 'index' => [ |
| 112 | 112 | 'path' => '', |
| 113 | 113 | 'title' => 'Home', |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | 'exclude' => true, |
| 159 | 159 | ], |
| 160 | 160 | ], |
| 161 | - 'output' => [ // https://cecil.app/documentation/configuration/#formats |
|
| 161 | + 'output' => [// https://cecil.app/documentation/configuration/#formats |
|
| 162 | 162 | 'dir' => '_site', // output directory (`_site` by default) |
| 163 | 163 | 'formats' => [ |
| 164 | 164 | // e.g.: blog/post-1/index.html |
@@ -240,14 +240,14 @@ discard block |
||
| 240 | 240 | 'exclude' => ['redirect', 'paginated'], |
| 241 | 241 | ], |
| 242 | 242 | ], |
| 243 | - 'pagetypeformats' => [ // formats applied by page type |
|
| 243 | + 'pagetypeformats' => [// formats applied by page type |
|
| 244 | 244 | 'page' => ['html'], |
| 245 | 245 | 'homepage' => ['html', 'atom'], |
| 246 | 246 | 'section' => ['html', 'atom'], |
| 247 | 247 | 'vocabulary' => ['html'], |
| 248 | 248 | 'term' => ['html', 'atom'], |
| 249 | 249 | ], |
| 250 | - 'postprocessors' => [ // list of output post processors |
|
| 250 | + 'postprocessors' => [// list of output post processors |
|
| 251 | 251 | -1 => 'Cecil\Renderer\PostProcessor\GeneratorMetaTag', |
| 252 | 252 | -2 => 'Cecil\Renderer\PostProcessor\HtmlExcerpt', |
| 253 | 253 | -3 => 'Cecil\Renderer\PostProcessor\MarkdownLink', |
@@ -301,9 +301,9 @@ discard block |
||
| 301 | 301 | 'enabled' => false, // `html` filter: creates and adds a WebP image as a `source` (`false` by default) |
| 302 | 302 | ], |
| 303 | 303 | 'cdn' => [ |
| 304 | - 'enabled' => false, // enables Image CDN (`false` by default) |
|
| 305 | - 'canonical' => true, // is `image_url` must be canonical or not (`true` by default) |
|
| 306 | - 'remote' => true, // includes remote images (`true` by default) |
|
| 304 | + 'enabled' => false, // enables Image CDN (`false` by default) |
|
| 305 | + 'canonical' => true, // is `image_url` must be canonical or not (`true` by default) |
|
| 306 | + 'remote' => true, // includes remote images (`true` by default) |
|
| 307 | 307 | //'account' => 'xxxx', // provider account |
| 308 | 308 | // Cloudinary |
| 309 | 309 | //'url' => 'https://res.cloudinary.com/%account%/image/fetch/c_limit,w_%width%,q_%quality%,f_%format%,d_default/%image_url%', |