ricovandevin / patternlab-twig-extensions-plugin
Adds the ability to load custom Twig extensions into PatternLab.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:patternlab-plugin
This package is not auto-updated.
Last update: 2025-05-03 18:16:44 UTC
README
Adds the ability to load custom Twig extensions into PatternLab.
Installation
Add the plugin as a dependency using Composer.
composer require ricovandevin/patternlab-twig-extensions-plugin
Create a folder 'extensions' inside the '_twig-components' folder of your PatternLab source folder, e.g.
mkdir src/_twig-components/extensions
You can now place the source code of the Twig extensions you want to include in this folder. To manage them with Composer and automatically place them in the right location use the composer/installers package
composer require composer/installers
and add this inside your composer.json
"extra": {
"installer-paths": {
"src/_twig-components/extensions": [
"VENDOR/PROJECT"
]
}
}