diff --git a/packages/edition-twig/alter-twig.php b/packages/edition-twig/alter-twig.php index 0c7c2918c..425775ae6 100644 --- a/packages/edition-twig/alter-twig.php +++ b/packages/edition-twig/alter-twig.php @@ -1,15 +1,17 @@ Hello {{ customTwigFunctionThatSaysWorld() }}!` => `
{{ reverse('abc') }}
` => `cba
` */ -// $env->addFunction(new \Twig_SimpleFunction('reverse', function ($theString) { +// $env->addFunction(new TwigFunction('reverse', function ($theString) { // return strrev($theString); // })); @@ -29,6 +31,5 @@ function addCustomExtension(\Twig_Environment &$env, $config) { // $env->addGlobal('foo', 'bar'); // example of enabling the Twig debug mode extension (ex. {{ dump(my_variable) }} to check out the template's available data) -- comment out to disable - // $env->addExtension(new \Twig_Extension_Debug()); - + // $env->addExtension(new Twig\Extension\DebugExtension()); } diff --git a/packages/edition-twig/source/_patterns/atoms/buttons/button-dark-demo.twig b/packages/edition-twig/source/_patterns/atoms/buttons/button-dark-demo.twig index 636b15686..5a61b3cb7 100644 --- a/packages/edition-twig/source/_patterns/atoms/buttons/button-dark-demo.twig +++ b/packages/edition-twig/source/_patterns/atoms/buttons/button-dark-demo.twig @@ -1,4 +1,4 @@ -{% include '@atoms/buttons/_button.twig' with { +{% include '@atoms/buttons/button.twig' with { text: 'Click Me', dark: true, } only %} diff --git a/packages/edition-twig/source/_patterns/atoms/buttons/button-simple-demo.twig b/packages/edition-twig/source/_patterns/atoms/buttons/button-simple-demo.twig index ae1350317..81cf5f6cb 100644 --- a/packages/edition-twig/source/_patterns/atoms/buttons/button-simple-demo.twig +++ b/packages/edition-twig/source/_patterns/atoms/buttons/button-simple-demo.twig @@ -1,3 +1,3 @@ -{% include '@atoms/buttons/_button.twig' with { +{% include '@atoms/buttons/button.twig' with { text: 'Click Me', } only %} diff --git a/packages/edition-twig/source/_patterns/atoms/buttons/button.md b/packages/edition-twig/source/_patterns/atoms/buttons/button.md new file mode 100644 index 000000000..683af9f1a --- /dev/null +++ b/packages/edition-twig/source/_patterns/atoms/buttons/button.md @@ -0,0 +1,3 @@ +--- +hidden: true +--- diff --git a/packages/edition-twig/source/_patterns/atoms/buttons/_button.twig b/packages/edition-twig/source/_patterns/atoms/buttons/button.twig similarity index 100% rename from packages/edition-twig/source/_patterns/atoms/buttons/_button.twig rename to packages/edition-twig/source/_patterns/atoms/buttons/button.twig diff --git a/packages/edition-twig/source/_patterns/atoms/text/headings.twig b/packages/edition-twig/source/_patterns/atoms/text/headings.twig index 2ecbbf0c5..deb727bab 100644 --- a/packages/edition-twig/source/_patterns/atoms/text/headings.twig +++ b/packages/edition-twig/source/_patterns/atoms/text/headings.twig @@ -1,6 +1,6 @@