Skip to content

Commit 66f3f02

Browse files
committed
refactor: alter-twig.php and _head.twig removing not needed lines
1 parent 77a3b97 commit 66f3f02

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

source/_meta/_head.twig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
<meta name="viewport" content="width=device-width,initial-scale=1.0">
88

99
<link rel="stylesheet" href="../../css/pattern-scaffolding.css?{{ cacheBuster }}" media="all" />
10-
{# webpack dev-server css file #}
11-
<link rel="stylesheet" href="/css/app.css">
1210

1311
<!-- Begin Pattern Lab (Required for Pattern Lab to run properly) -->
1412
{{ patternLabHead | raw }}

source/_twig/alter-twig.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,8 @@
11
<?php
2-
32
/**
43
* @param Twig_Environment $env - The Twig Environment - https://twig.symfony.com/api/1.x/Twig_Environment.html
54
* @param $config - Config of `@basalt/twig-renderer`
65
*/
76
function addCustomExtension(\Twig_Environment &$env, $config) {
8-
9-
/**
10-
* @example `<h1>Hello {{ customTwigFunctionThatSaysWorld() }}!</h1>` => `<h1>Hello Custom World</h1>`
11-
*/
12-
// $env->addFunction(new \Twig_SimpleFunction('customTwigFunctionThatSaysWorld', function () {
13-
// return 'Custom World';
14-
// }));
15-
16-
/*
17-
* Reverse a string
18-
* @param string $theString
19-
* @example `<p>{{ reverse('abc') }}</p>` => `<p>cba</p>`
20-
*/
21-
// $env->addFunction(new \Twig_SimpleFunction('reverse', function ($theString) {
22-
// return strrev($theString);
23-
// }));
24-
25-
26-
// $env->addExtension(new \My\CustomExtension());
27-
28-
// `{{ foo }}` => `bar`
29-
// $env->addGlobal('foo', 'bar');
30-
31-
// example of enabling the Twig debug mode extension (ex. {{ dump(my_variable) }} to check out the template's available data) -- comment out to disable
327
$env->addExtension(new \Twig_Extension_Debug());
33-
348
}

0 commit comments

Comments
 (0)