@@ -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? |
@@ -77,21 +77,21 @@ |
||
77 | 77 | } |
78 | 78 | }); |
79 | 79 | $this->data = [ |
80 | - 'file' => '', // absolute file path |
|
81 | - 'files' => [], // bundle: files path |
|
82 | - 'filename' => '', // filename |
|
83 | - 'path_source' => '', // public path to the file, before transformations |
|
84 | - 'path' => '', // public path to the file, after transformations |
|
80 | + 'file' => '', // absolute file path |
|
81 | + 'files' => [], // bundle: files path |
|
82 | + 'filename' => '', // filename |
|
83 | + 'path_source' => '', // public path to the file, before transformations |
|
84 | + 'path' => '', // public path to the file, after transformations |
|
85 | 85 | 'missing' => false, // if file not found, but missing ollowed 'missing' is true |
86 | - 'ext' => '', // file extension |
|
87 | - 'type' => '', // file type (e.g.: image, audio, video, etc.) |
|
88 | - 'subtype' => '', // file media type (e.g.: image/png, audio/mp3, etc.) |
|
89 | - 'size' => 0, // file size (in bytes) |
|
90 | - 'content_source' => '', // file content, before transformations |
|
91 | - 'content' => '', // file content, after transformations |
|
92 | - 'width' => 0, // width (in pixels) in case of an image |
|
93 | - 'height' => 0, // height (in pixels) in case of an image |
|
94 | - 'exif' => [], // exif data |
|
86 | + 'ext' => '', // file extension |
|
87 | + 'type' => '', // file type (e.g.: image, audio, video, etc.) |
|
88 | + 'subtype' => '', // file media type (e.g.: image/png, audio/mp3, etc.) |
|
89 | + 'size' => 0, // file size (in bytes) |
|
90 | + 'content_source' => '', // file content, before transformations |
|
91 | + 'content' => '', // file content, after transformations |
|
92 | + 'width' => 0, // width (in pixels) in case of an image |
|
93 | + 'height' => 0, // height (in pixels) in case of an image |
|
94 | + 'exif' => [], // exif data |
|
95 | 95 | ]; |
96 | 96 | |
97 | 97 | // handles options |
@@ -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 |
@@ -18,19 +18,19 @@ 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' => [ |
30 | 30 | // 'format' => 'j F Y', // @see https://www.php.net/manual/fr/datetime.format.php#refsect1-datetime.format-parameters |
31 | 31 | // 'timezone' => 'Europe/Paris', |
32 | 32 | //], |
33 | - 'output' => [ // https://cecil.app/documentation/configuration/#formats |
|
33 | + 'output' => [// https://cecil.app/documentation/configuration/#formats |
|
34 | 34 | 'dir' => '_site', // output directory (`_site` by default) |
35 | 35 | 'formats' => [ |
36 | 36 | // e.g.: blog/post-1/index.html |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | 'exclude' => ['redirect', 'paginated'], |
113 | 113 | ], |
114 | 114 | ], |
115 | - 'pagetypeformats' => [ // formats applied by page type |
|
115 | + 'pagetypeformats' => [// formats applied by page type |
|
116 | 116 | 'page' => ['html'], |
117 | 117 | 'homepage' => ['html', 'atom'], |
118 | 118 | 'section' => ['html', 'atom'], |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'locale' => 'en_US', |
129 | 129 | ], |
130 | 130 | ], |
131 | - 'defaultpages' => [ // default generated pages |
|
131 | + 'defaultpages' => [// default generated pages |
|
132 | 132 | 'index' => [ |
133 | 133 | 'path' => '', |
134 | 134 | 'title' => 'Home', |
@@ -188,17 +188,17 @@ discard block |
||
188 | 188 | 'format' => 'yaml', // front matter format: `yaml`, `ini`, `toml` or `json` (`yaml` by default) |
189 | 189 | ], |
190 | 190 | 'body' => [ |
191 | - 'format' => 'md', // page body format (only Markdown is supported) |
|
191 | + 'format' => 'md', // page body format (only Markdown is supported) |
|
192 | 192 | 'toc' => ['h2', 'h3'], // headers used to build the table of contents |
193 | 193 | 'highlight' => [ |
194 | - 'enabled' => false, // enables code syntax highlighting (`false` by default) |
|
194 | + 'enabled' => false, // enables code syntax highlighting (`false` by default) |
|
195 | 195 | ], |
196 | 196 | 'images' => [ |
197 | 197 | 'lazy' => [ |
198 | - 'enabled' => true, // adds `loading="lazy"` attribute (`true` by default) |
|
198 | + 'enabled' => true, // adds `loading="lazy"` attribute (`true` by default) |
|
199 | 199 | ], |
200 | 200 | 'decoding' => [ |
201 | - 'enabled' => true, // adds `decoding="async"` attribute (`true` by default) |
|
201 | + 'enabled' => true, // adds `decoding="async"` attribute (`true` by default) |
|
202 | 202 | ], |
203 | 203 | 'resize' => [ |
204 | 204 | 'enabled' => false, // enables image resizing by using the `width` extra attribute (`false` by default) |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | 'responsive' => [ |
210 | 210 | 'enabled' => false, // creates responsive images and adds them to the `srcset` attribute (`false` by default) |
211 | 211 | ], |
212 | - 'class' => '', // puts default CSS class to each image (empty by default) |
|
212 | + 'class' => '', // puts default CSS class to each image (empty by default) |
|
213 | 213 | 'caption' => [ |
214 | 214 | 'enabled' => false, // puts the image in a <figure> element and adds a <figcaption> containing the title (`false` by default) |
215 | 215 | ], |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | 'enabled' => true, // turns remote images to Asset to handling them (`true` by default) |
218 | 218 | 'fallback' => [ |
219 | 219 | 'enabled' => false, // enables a fallback if image is not found (`false` by default) |
220 | - 'path' => '', // path to the fallback image, stored in assets dir (empty by default) |
|
220 | + 'path' => '', // path to the fallback image, stored in assets dir (empty by default) |
|
221 | 221 | ], |
222 | 222 | ], |
223 | 223 | ], |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | ], |
235 | 235 | 'excerpt' => [ |
236 | 236 | 'separator' => 'excerpt|break', // string to use as separator (`excerpt|break` by default) |
237 | - 'capture' => 'before', // part to capture, `before` or `after` the separator (`before` by default) |
|
237 | + 'capture' => 'before', // part to capture, `before` or `after` the separator (`before` by default) |
|
238 | 238 | ], |
239 | 239 | ], |
240 | 240 | // data files |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | 'dir' => 'translations', // translations files cache directory (`assets` by default) |
342 | 342 | ], |
343 | 343 | ], |
344 | - 'generators' => [ // list of generators ordered by index weight |
|
344 | + 'generators' => [// list of generators ordered by index weight |
|
345 | 345 | 10 => 'Cecil\Generator\DefaultPages', |
346 | 346 | 20 => 'Cecil\Generator\VirtualPages', |
347 | 347 | 30 => 'Cecil\Generator\ExternalBody', |