Metalsmith plugin to look for Drupal Attribute JSON maps to transform into Drupal Attribute objects for Twig
npm install --save metalsmith-drupal-attribute-twig
If you are using the command-line version of Metalsmith, you can install via npm, and then add the metalsmith-drupal-attribute-twig
key to your metalsmith.json
file:
{
"plugins": {
"metalsmith-drupal-attribute-twig": {
inheritFilePrefix: '@kalastatic/'
}
}
}
If you are using the JS Api for Metalsmith, then you can require the module and add it to your .use()
directives:
var jstransformer = require('metalsmith-drupal-attribute-twig');
metalsmith.use(jstransformer({
'inheritFilePrefix': '@kalastatic/'
}));
MIT