@@ -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 |
@@ -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')); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ], |
44 | 44 | ], |
45 | 45 | 'theme' => [], |
46 | - 'taxonomies' => [ // default taxonomies |
|
46 | + 'taxonomies' => [// default taxonomies |
|
47 | 47 | 'tags' => 'tag', |
48 | 48 | 'categories' => 'category', // can be disabled with the special "disabled" value |
49 | 49 | ], |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'capture' => 'before', // part to capture, `before` or `after` the separator (`before` by default) |
109 | 109 | ], |
110 | 110 | ], |
111 | - 'generators' => [ // list of pages generators, ordered by weight |
|
111 | + 'generators' => [// list of pages generators, ordered by weight |
|
112 | 112 | 10 => 'Cecil\Generator\DefaultPages', |
113 | 113 | 20 => 'Cecil\Generator\VirtualPages', |
114 | 114 | 30 => 'Cecil\Generator\ExternalBody', |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | 80 => 'Cecil\Generator\Alias', |
120 | 120 | 90 => 'Cecil\Generator\Redirect', |
121 | 121 | ], |
122 | - 'default' => [ // default generated pages |
|
122 | + 'default' => [// default generated pages |
|
123 | 123 | 'index' => [ |
124 | 124 | 'path' => '', |
125 | 125 | 'title' => 'Home', |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | 'internal' => [ |
242 | 242 | 'dir' => 'resources/layouts', // internal templates directory |
243 | 243 | ], |
244 | - 'translations' => [ // i18n |
|
244 | + 'translations' => [// i18n |
|
245 | 245 | 'dir' => 'translations', // translations files directory (`translations` by default) |
246 | 246 | 'formats' => ['yaml', 'mo'], // translations supported formats (`yaml` and `mo`) |
247 | 247 | 'internal' => [ |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | ], |
257 | 257 | 'output' => [ |
258 | 258 | 'dir' => '_site', // output directory (`_site` by default) |
259 | - 'formats' => [ // https://cecil.app/documentation/configuration/#formats |
|
259 | + 'formats' => [// https://cecil.app/documentation/configuration/#formats |
|
260 | 260 | // e.g.: blog/post-1/index.html |
261 | 261 | -1 => [ |
262 | 262 | 'name' => 'html', |
@@ -352,14 +352,14 @@ discard block |
||
352 | 352 | 'exclude' => ['redirect', 'paginated'], |
353 | 353 | ], |
354 | 354 | ], |
355 | - 'pagetypeformats' => [ // formats applied by page type |
|
355 | + 'pagetypeformats' => [// formats applied by page type |
|
356 | 356 | 'page' => ['html'], |
357 | 357 | 'homepage' => ['html', 'atom'], |
358 | 358 | 'section' => ['html', 'atom'], |
359 | 359 | 'vocabulary' => ['html'], |
360 | 360 | 'term' => ['html', 'atom'], |
361 | 361 | ], |
362 | - 'postprocessors' => [ // list of output post processors |
|
362 | + 'postprocessors' => [// list of output post processors |
|
363 | 363 | -1 => 'Cecil\Renderer\PostProcessor\GeneratorMetaTag', |
364 | 364 | -2 => 'Cecil\Renderer\PostProcessor\HtmlExcerpt', |
365 | 365 | -3 => 'Cecil\Renderer\PostProcessor\MarkdownLink', |
@@ -141,7 +141,7 @@ |
||
141 | 141 | /** |
142 | 142 | * Adds navigation (next and prev) to section subpages. |
143 | 143 | */ |
144 | - protected function addNavigationLinks(PagesCollection $pages, string|null $sortBy = null, bool $circular = false): void |
|
144 | + protected function addNavigationLinks(PagesCollection $pages, string | null $sortBy = null, bool $circular = false): void |
|
145 | 145 | { |
146 | 146 | $pagesAsArray = $pages->toArray(); |
147 | 147 | if ($sortBy === null || $sortBy == 'date' || $sortBy == 'updated') { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Sorts pages by. |
51 | 51 | */ |
52 | - public function sortBy(array|string|null $options): self |
|
52 | + public function sortBy(array | string | null $options): self |
|
53 | 53 | { |
54 | 54 | /* |
55 | 55 | * $options: date|updated|title|weight |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Sorts pages by date (or 'updated'): the most recent first. |
72 | 72 | */ |
73 | - public function sortByDate(array|string|null $options = null): self |
|
73 | + public function sortByDate(array | string | null $options = null): self |
|
74 | 74 | { |
75 | 75 | $opt = []; |
76 | 76 | // backward compatibility (i.e. $options = 'updated') |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * Sorts pages by title (natural sort). |
106 | 106 | */ |
107 | - public function sortByTitle(array|string|null $options = null): self |
|
107 | + public function sortByTitle(array | string | null $options = null): self |
|
108 | 108 | { |
109 | 109 | $opt = []; |
110 | 110 | // options |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | /** |
119 | 119 | * Sorts by weight (the heaviest first). |
120 | 120 | */ |
121 | - public function sortByWeight(array|string|null $options = null): self |
|
121 | + public function sortByWeight(array | string | null $options = null): self |
|
122 | 122 | { |
123 | 123 | $opt = []; |
124 | 124 | // options |