Skip to content

Commit

Permalink
feat: components custom extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Jan 22, 2025
1 parent 3c6f44d commit c58fd00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
],
'components' => [ // components
'dir' => 'components', // components directory
'ext' => 'twig', // components files extension
],
],
'themes' => [
Expand Down
1 change: 1 addition & 0 deletions src/Renderer/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public function __construct(Builder $builder, $templatesPath)
// components
Configuration::make($this->twig)
->setTemplatesPath($this->builder->getConfig()->get('layouts.components.dir') ?? 'components')
->setTemplatesExtension($this->builder->getConfig()->get('layouts.components.ext') ?? 'twig')
->useCustomTags()
->setup();
// debug
Expand Down

0 comments on commit c58fd00

Please sign in to comment.