@@ -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 |
@@ -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 |
@@ -143,8 +143,8 @@ |
||
143 | 143 | $layouts = [ |
144 | 144 | // "taxonomy/$term.$format.$ext", // e.g.: taxonomy/velo.html.twig |
145 | 145 | // "taxonomy/$singular.$format.$ext", // e.g.: taxonomy/tag.html.twig |
146 | - "_default/term.$format.$ext", // e.g.: _default/term.html.twig |
|
147 | - "_default/list.$format.$ext", // e.g.: _default/list.html.twig |
|
146 | + "_default/term.$format.$ext", // e.g.: _default/term.html.twig |
|
147 | + "_default/list.$format.$ext", // e.g.: _default/list.html.twig |
|
148 | 148 | ]; |
149 | 149 | if ($page->hasVariable('term')) { |
150 | 150 | $layouts = array_merge( |
@@ -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? |
@@ -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' => 'F j, 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 |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'exclude' => ['redirect', 'paginated'], |
129 | 129 | ], |
130 | 130 | ], |
131 | - 'pagetypeformats' => [ // formats applied by page type |
|
131 | + 'pagetypeformats' => [// formats applied by page type |
|
132 | 132 | 'page' => ['html'], |
133 | 133 | 'homepage' => ['html', 'atom'], |
134 | 134 | 'section' => ['html', 'atom'], |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | 'locale' => 'en_US', |
145 | 145 | ], |
146 | 146 | ], |
147 | - 'defaultpages' => [ // default generated pages |
|
147 | + 'defaultpages' => [// default generated pages |
|
148 | 148 | 'index' => [ |
149 | 149 | 'path' => '', |
150 | 150 | 'title' => 'Home', |
@@ -204,17 +204,17 @@ discard block |
||
204 | 204 | 'format' => 'yaml', // front matter format: `yaml`, `ini`, `toml` or `json` (`yaml` by default) |
205 | 205 | ], |
206 | 206 | 'body' => [ |
207 | - 'format' => 'md', // page body format (only Markdown is supported) |
|
207 | + 'format' => 'md', // page body format (only Markdown is supported) |
|
208 | 208 | 'toc' => ['h2', 'h3'], // headers used to build the table of contents |
209 | 209 | 'highlight' => [ |
210 | - 'enabled' => false, // enables code syntax highlighting (`false` by default) |
|
210 | + 'enabled' => false, // enables code syntax highlighting (`false` by default) |
|
211 | 211 | ], |
212 | 212 | 'images' => [ |
213 | 213 | 'lazy' => [ |
214 | - 'enabled' => true, // adds `loading="lazy"` attribute (`true` by default) |
|
214 | + 'enabled' => true, // adds `loading="lazy"` attribute (`true` by default) |
|
215 | 215 | ], |
216 | 216 | 'decoding' => [ |
217 | - 'enabled' => true, // adds `decoding="async"` attribute (`true` by default) |
|
217 | + 'enabled' => true, // adds `decoding="async"` attribute (`true` by default) |
|
218 | 218 | ], |
219 | 219 | 'resize' => [ |
220 | 220 | 'enabled' => false, // enables image resizing by using the `width` extra attribute (`false` by default) |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | 'responsive' => [ |
226 | 226 | 'enabled' => false, // creates responsive images and adds them to the `srcset` attribute (`false` by default) |
227 | 227 | ], |
228 | - 'class' => '', // puts default CSS class to each image (empty by default) |
|
228 | + 'class' => '', // puts default CSS class to each image (empty by default) |
|
229 | 229 | 'caption' => [ |
230 | 230 | 'enabled' => false, // puts the image in a <figure> element and adds a <figcaption> containing the title (`false` by default) |
231 | 231 | ], |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | 'enabled' => true, // turns remote images to Asset to handling them (`true` by default) |
234 | 234 | 'fallback' => [ |
235 | 235 | 'enabled' => false, // enables a fallback if image is not found (`false` by default) |
236 | - 'path' => '', // path to the fallback image, stored in assets dir (empty by default) |
|
236 | + 'path' => '', // path to the fallback image, stored in assets dir (empty by default) |
|
237 | 237 | ], |
238 | 238 | ], |
239 | 239 | ], |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | ], |
251 | 251 | 'excerpt' => [ |
252 | 252 | 'separator' => 'excerpt|break', // string to use as separator (`excerpt|break` by default) |
253 | - 'capture' => 'before', // part to capture, `before` or `after` the separator (`before` by default) |
|
253 | + 'capture' => 'before', // part to capture, `before` or `after` the separator (`before` by default) |
|
254 | 254 | ], |
255 | 255 | ], |
256 | 256 | // data files |
@@ -320,9 +320,9 @@ discard block |
||
320 | 320 | ], |
321 | 321 | 'cdn' => [ |
322 | 322 | 'enabled' => false, // enables Image CDN (`false` by default) |
323 | - 'canonical' => true, // is `image_url` must be canonical or not (`true` by default) |
|
324 | - 'remote' => true, // includes remote images (`true` by default) |
|
325 | - 'svg' => true, // should support SVG format? (`true` by default) |
|
323 | + 'canonical' => true, // is `image_url` must be canonical or not (`true` by default) |
|
324 | + 'remote' => true, // includes remote images (`true` by default) |
|
325 | + 'svg' => true, // should support SVG format? (`true` by default) |
|
326 | 326 | //'account' => 'xxxx', // provider account |
327 | 327 | // Cloudinary |
328 | 328 | //'url' => 'https://res.cloudinary.com/%account%/image/fetch/c_limit,w_%width%,q_%quality%,f_%format%,d_default/%image_url%', |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | 'dir' => 'translations', // translations files cache directory (`assets` by default) |
373 | 373 | ], |
374 | 374 | ], |
375 | - 'generators' => [ // list of generators ordered by index weight |
|
375 | + 'generators' => [// list of generators ordered by index weight |
|
376 | 376 | 10 => 'Cecil\Generator\DefaultPages', |
377 | 377 | 20 => 'Cecil\Generator\VirtualPages', |
378 | 378 | 30 => 'Cecil\Generator\ExternalBody', |