@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $this->builder = $builder; |
72 | 72 | $this->config = $builder->getConfig(); |
73 | 73 | $paths = is_array($paths) ? $paths : [$paths]; |
74 | - array_walk($paths, function ($path) { |
|
74 | + array_walk($paths, function($path) { |
|
75 | 75 | if (empty($path)) { |
76 | 76 | throw new RuntimeException('The path parameter of "asset() can\'t be empty."'); |
77 | 77 | } |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | 'ext' => '', // file extension |
85 | 85 | 'type' => '', // file type (e.g.: image, audio, video, etc.) |
86 | 86 | 'subtype' => '', // file media type (e.g.: image/png, audio/mp3, etc.) |
87 | - 'size' => 0, // file size (in bytes) |
|
87 | + 'size' => 0, // file size (in bytes) |
|
88 | 88 | 'content_source' => '', // file content, before transformations |
89 | 89 | 'content' => '', // file content, after transformations |
90 | - 'width' => 0, // width (in pixels) in case of an image |
|
91 | - 'height' => 0, // height (in pixels) in case of an image |
|
90 | + 'width' => 0, // width (in pixels) in case of an image |
|
91 | + 'height' => 0, // height (in pixels) in case of an image |
|
92 | 92 | ]; |
93 | 93 | |
94 | 94 | // handles options |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | |
423 | 423 | try { |
424 | 424 | $img = ImageManager::make($assetResized->data['content_source']); |
425 | - $img->resize($width, null, function (\Intervention\Image\Constraint $constraint) { |
|
425 | + $img->resize($width, null, function(\Intervention\Image\Constraint $constraint) { |
|
426 | 426 | $constraint->aspectRatio(); |
427 | 427 | $constraint->upsize(); |
428 | 428 | }); |
@@ -112,7 +112,7 @@ |
||
112 | 112 | */ |
113 | 113 | public function getPages(): \Cecil\Collection\Page\Collection |
114 | 114 | { |
115 | - return $this->builder->getPages()->filter(function (CollectionPage $page) { |
|
115 | + return $this->builder->getPages()->filter(function(CollectionPage $page) { |
|
116 | 116 | // We should fix case of virtual pages without language |
117 | 117 | if ($page->getLanguage() === null && $this->language == $this->config->getLanguageDefault()) { |
118 | 118 | return true; |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $this->generate(); |
51 | 51 | |
52 | 52 | // set default language (ex: "en") if necessary |
53 | - $this->generatedPages->map(function (\Cecil\Collection\Page\Page $page) { |
|
53 | + $this->generatedPages->map(function(\Cecil\Collection\Page\Page $page) { |
|
54 | 54 | if ($page->getLanguage() === null) { |
55 | 55 | $page->setLanguage($this->config->getLanguageDefault()); |
56 | 56 | } |
@@ -140,7 +140,7 @@ |
||
140 | 140 | */ |
141 | 141 | protected function collectPages(): void |
142 | 142 | { |
143 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
143 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
144 | 144 | return $page->hasVariable('menu') |
145 | 145 | && $page->getVariable('published') |
146 | 146 | && in_array($page->getLanguage() ?? $this->config->getLanguageDefault(), array_column($this->config->getLanguages(), 'code')); |
@@ -132,7 +132,7 @@ |
||
132 | 132 | $buildProcess->setPty(Process::isPtySupported()); |
133 | 133 | $buildProcess->setTimeout(3600 * 2); // timeout = 2 minutes |
134 | 134 | |
135 | - $processOutputCallback = function ($type, $data) use ($output) { |
|
135 | + $processOutputCallback = function($type, $data) use ($output) { |
|
136 | 136 | $output->write($data, false, OutputInterface::OUTPUT_RAW); |
137 | 137 | }; |
138 | 138 |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | 'title' => 'Site title', |
17 | 17 | //'baseline' => 'Site baseline', |
18 | 18 | 'baseurl' => 'http://localhost:8000/', |
19 | - 'canonicalurl' => false, // if true 'url()' function preprends URL wirh 'baseurl' |
|
19 | + 'canonicalurl' => false, // if true 'url()' function preprends URL wirh 'baseurl' |
|
20 | 20 | 'description' => 'Site description', |
21 | - 'taxonomies' => [ // default taxonomies |
|
21 | + 'taxonomies' => [// default taxonomies |
|
22 | 22 | 'tags' => 'tag', // can be disabled with 'disabled' value |
23 | 23 | 'categories' => 'category', |
24 | 24 | ], |
25 | 25 | 'pagination' => [ |
26 | - 'max' => 5, // number of pages on each paginated pages |
|
26 | + 'max' => 5, // number of pages on each paginated pages |
|
27 | 27 | 'path' => 'page', // path to paginated pages. ie: '/blog/page/2/' |
28 | 28 | ], |
29 | 29 | 'date' => [ |
@@ -159,17 +159,17 @@ discard block |
||
159 | 159 | 'format' => 'yaml', |
160 | 160 | ], |
161 | 161 | 'body' => [ |
162 | - 'format' => 'md', // page body format (only Markdown is supported) |
|
162 | + 'format' => 'md', // page body format (only Markdown is supported) |
|
163 | 163 | 'toc' => ['h2', 'h3'], // headers used to build the table of contents |
164 | 164 | 'images' => [ |
165 | 165 | 'lazy' => [ |
166 | - 'enabled' => true, // enables lazy loading (`true` by default) |
|
166 | + 'enabled' => true, // enables lazy loading (`true` by default) |
|
167 | 167 | ], |
168 | 168 | 'caption' => [ |
169 | 169 | 'enabled' => false, // adds <figcaption> to images with a title (`false` by default) |
170 | 170 | ], |
171 | 171 | 'remote' => [ |
172 | - 'enabled' => true, // enables remote image handling (`true` by default) |
|
172 | + 'enabled' => true, // enables remote image handling (`true` by default) |
|
173 | 173 | ], |
174 | 174 | 'resize' => [ |
175 | 175 | 'enabled' => false, // enables image resizing by using the `width` extra attribute (`false` by default) |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | ], |
183 | 183 | ], |
184 | 184 | 'notes' => [ |
185 | - 'enabled' => false, // enables Notes blocks (`false` by default) |
|
185 | + 'enabled' => false, // enables Notes blocks (`false` by default) |
|
186 | 186 | ], |
187 | 187 | 'highlight' => [ |
188 | - 'enabled' => false, // enables syntax highlighting (`false` by default) |
|
188 | + 'enabled' => false, // enables syntax highlighting (`false` by default) |
|
189 | 189 | ], |
190 | 190 | ], |
191 | 191 | // data files |
@@ -213,17 +213,17 @@ discard block |
||
213 | 213 | ], |
214 | 214 | 'assets' => [ |
215 | 215 | 'dir' => 'assets', |
216 | - 'compile' => [ // Compile Saas |
|
216 | + 'compile' => [// Compile Saas |
|
217 | 217 | 'enabled' => true, |
218 | 218 | 'style' => 'expanded', // 'expanded' or 'compressed', |
219 | 219 | 'import' => ['sass', 'scss', 'node_modules'], |
220 | 220 | 'sourcemap' => false, // works in debug mode only |
221 | 221 | //'variables' => ['var' => 'value'] |
222 | 222 | ], |
223 | - 'minify' => [ // Minify CSS and JS |
|
223 | + 'minify' => [// Minify CSS and JS |
|
224 | 224 | 'enabled' => true, |
225 | 225 | ], |
226 | - 'fingerprint' => [ // Add fingerprint |
|
226 | + 'fingerprint' => [// Add fingerprint |
|
227 | 227 | 'enabled' => true, |
228 | 228 | ], |
229 | 229 | 'target' => 'assets', // target directory of remote and resized assets |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | 'optimize' => [ |
232 | 232 | 'enabled' => false, // enables images optimization with JpegOptim, Optipng, Pngquant 2, SVGO 1, Gifsicle, cwebp (`false` by default) |
233 | 233 | ], |
234 | - 'quality' => 75, // Image quality after optimization or resize (`75` by default) |
|
234 | + 'quality' => 75, // Image quality after optimization or resize (`75` by default) |
|
235 | 235 | 'responsive' => [ |
236 | 236 | 'enabled' => false, // creates responsive images with `html` filter (`false` by default) |
237 | 237 | 'widths' => [480, 640, 768, 1024, 1366, 1600, 1920], |