@@ -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 |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | 'locale' => 'en_US', |
31 | 31 | ], |
32 | 32 | ], |
33 | - 'taxonomies' => [ // default taxonomies |
|
33 | + 'taxonomies' => [// default taxonomies |
|
34 | 34 | 'tags' => 'tag', // can be disabled with the special "disabled" value |
35 | 35 | 'categories' => 'category', |
36 | 36 | ], |
37 | 37 | 'pagination' => [ |
38 | - 'max' => 5, // number of pages by each paginated pages |
|
38 | + 'max' => 5, // number of pages by each paginated pages |
|
39 | 39 | 'path' => 'page', // path to paginated pages (e.g.: `/blog/page/2/`) |
40 | 40 | ], |
41 | 41 | 'pages' => [ |
@@ -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', |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 80 => 'Cecil\Generator\Alias', |
107 | 107 | 90 => 'Cecil\Generator\Redirect', |
108 | 108 | ], |
109 | - 'default' => [ // default generated pages |
|
109 | + 'default' => [// default generated pages |
|
110 | 110 | 'index' => [ |
111 | 111 | 'path' => '', |
112 | 112 | 'title' => 'Home', |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | 'enabled' => false, // `html` filter: creates and adds a WebP image as a `source` (`false` by default) |
208 | 208 | ], |
209 | 209 | 'cdn' => [ |
210 | - 'enabled' => false, // enables Image CDN (`false` by default) |
|
211 | - 'canonical' => true, // is `image_url` must be canonical or not (`true` by default) |
|
212 | - 'remote' => true, // includes remote images (`true` by default) |
|
210 | + 'enabled' => false, // enables Image CDN (`false` by default) |
|
211 | + 'canonical' => true, // is `image_url` must be canonical or not (`true` by default) |
|
212 | + 'remote' => true, // includes remote images (`true` by default) |
|
213 | 213 | //'account' => 'xxxx', // provider account |
214 | 214 | // Cloudinary |
215 | 215 | //'url' => 'https://res.cloudinary.com/%account%/image/fetch/c_limit,w_%width%,q_%quality%,f_%format%,d_default/%image_url%', |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | 'dir' => 'themes', // where themes are stored (`themes` by default) |
233 | 233 | ], |
234 | 234 | 'extensions' => [], // Twig extensions |
235 | - 'translations' => [ // i18n |
|
235 | + 'translations' => [// i18n |
|
236 | 236 | 'dir' => 'translations', // translations files directory (`translations` by default) |
237 | 237 | 'formats' => ['yaml', 'mo'], // translations supported formats (`yaml` and `mo`) |
238 | 238 | 'internal' => [ |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | ], |
243 | 243 | 'output' => [ |
244 | 244 | 'dir' => '_site', // output directory (`_site` by default) |
245 | - 'formats' => [ // https://cecil.app/documentation/configuration/#formats |
|
245 | + 'formats' => [// https://cecil.app/documentation/configuration/#formats |
|
246 | 246 | // e.g.: blog/post-1/index.html |
247 | 247 | -1 => [ |
248 | 248 | 'name' => 'html', |
@@ -322,14 +322,14 @@ discard block |
||
322 | 322 | 'exclude' => ['redirect', 'paginated'], |
323 | 323 | ], |
324 | 324 | ], |
325 | - 'pagetypeformats' => [ // formats applied by page type |
|
325 | + 'pagetypeformats' => [// formats applied by page type |
|
326 | 326 | 'page' => ['html'], |
327 | 327 | 'homepage' => ['html', 'atom'], |
328 | 328 | 'section' => ['html', 'atom'], |
329 | 329 | 'vocabulary' => ['html'], |
330 | 330 | 'term' => ['html', 'atom'], |
331 | 331 | ], |
332 | - 'postprocessors' => [ // list of output post processors |
|
332 | + 'postprocessors' => [// list of output post processors |
|
333 | 333 | -1 => 'Cecil\Renderer\PostProcessor\GeneratorMetaTag', |
334 | 334 | -2 => 'Cecil\Renderer\PostProcessor\HtmlExcerpt', |
335 | 335 | -3 => 'Cecil\Renderer\PostProcessor\MarkdownLink', |