| @@ -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 | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | 'locale' => 'en_US', | 
| 31 | 31 | ], | 
| 32 | 32 | ], | 
| 33 | - 'taxonomies' => [ // default taxonomies | |
| 33 | + 'taxonomies' => [// default taxonomies | |
| 34 | 34 | 'tags' => 'tag', | 
| 35 | 35 | 'categories' => 'category', // can be disabled with the special "disabled" value | 
| 36 | 36 | ], | 
| @@ -95,7 +95,7 @@ discard block | ||
| 95 | 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', | 
| @@ -228,7 +228,7 @@ discard block | ||
| 228 | 228 | 'internal' => [ | 
| 229 | 229 | 'dir' => 'resources/layouts', // internal templates directory | 
| 230 | 230 | ], | 
| 231 | - 'translations' => [ // i18n | |
| 231 | + 'translations' => [// i18n | |
| 232 | 232 | 'dir' => 'translations', // translations files directory (`translations` by default) | 
| 233 | 233 | 'formats' => ['yaml', 'mo'], // translations supported formats (`yaml` and `mo`) | 
| 234 | 234 | 'internal' => [ | 
| @@ -243,7 +243,7 @@ discard block | ||
| 243 | 243 | ], | 
| 244 | 244 | 'output' => [ | 
| 245 | 245 | 'dir' => '_site', // output directory (`_site` by default) | 
| 246 | - 'formats' => [ // https://cecil.app/documentation/configuration/#formats | |
| 246 | + 'formats' => [// https://cecil.app/documentation/configuration/#formats | |
| 247 | 247 | // e.g.: blog/post-1/index.html | 
| 248 | 248 | -1 => [ | 
| 249 | 249 | 'name' => 'html', | 
| @@ -323,14 +323,14 @@ discard block | ||
| 323 | 323 | 'exclude' => ['redirect', 'paginated'], | 
| 324 | 324 | ], | 
| 325 | 325 | ], | 
| 326 | - 'pagetypeformats' => [ // formats applied by page type | |
| 326 | + 'pagetypeformats' => [// formats applied by page type | |
| 327 | 327 | 'page' => ['html'], | 
| 328 | 328 | 'homepage' => ['html', 'atom'], | 
| 329 | 329 | 'section' => ['html', 'atom'], | 
| 330 | 330 | 'vocabulary' => ['html'], | 
| 331 | 331 | 'term' => ['html', 'atom'], | 
| 332 | 332 | ], | 
| 333 | - 'postprocessors' => [ // list of output post processors | |
| 333 | + 'postprocessors' => [// list of output post processors | |
| 334 | 334 | -1 => 'Cecil\Renderer\PostProcessor\GeneratorMetaTag', | 
| 335 | 335 | -2 => 'Cecil\Renderer\PostProcessor\HtmlExcerpt', | 
| 336 | 336 | -3 => 'Cecil\Renderer\PostProcessor\MarkdownLink', | 
| @@ -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? | 
| @@ -131,8 +131,8 @@ | ||
| 131 | 131 | $layouts = [ | 
| 132 | 132 | // "taxonomy/$term.$format.$ext", // e.g.: taxonomy/velo.html.twig | 
| 133 | 133 | // "taxonomy/$singular.$format.$ext", // e.g.: taxonomy/tag.html.twig | 
| 134 | - "_default/term.$format.$ext", // e.g.: _default/term.html.twig | |
| 135 | - "_default/list.$format.$ext", // e.g.: _default/list.html.twig | |
| 134 | + "_default/term.$format.$ext", // e.g.: _default/term.html.twig | |
| 135 | + "_default/list.$format.$ext", // e.g.: _default/list.html.twig | |
| 136 | 136 | ]; | 
| 137 | 137 |                  if ($page->hasVariable('term')) { | 
| 138 | 138 |                      $layouts = array_merge(["taxonomy/{$page->getVariable('term')}.$format.$ext"], $layouts); | 
| @@ -46,7 +46,7 @@ | ||
| 46 | 46 | /** | 
| 47 | 47 |       * {@inheritdoc} | 
| 48 | 48 | */ | 
| 49 | - public function log($level, string|\Stringable $message, array $context = []): void | |
| 49 | + public function log($level, string | \Stringable $message, array $context = []): void | |
| 50 | 50 |      { | 
| 51 | 51 |          if (!isset($this->verbosityLevelMap[$level])) { | 
| 52 | 52 |              throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); | 
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 | /** | 
| 61 | 61 |       * {@inheritdoc} | 
| 62 | 62 | */ | 
| 63 | - public function log($level, string|\Stringable $message, array $context = []): void | |
| 63 | + public function log($level, string | \Stringable $message, array $context = []): void | |
| 64 | 64 |      { | 
| 65 | 65 | $output = $this->output; | 
| 66 | 66 |          $output->getFormatter()->setStyle('text', new OutputFormatterStyle('white')); |