Skip to content

Commit 1c107b1

Browse files
committed
Merge branch 'dev'
2 parents 151acdf + 950bb06 commit 1c107b1

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ You can also:
137137

138138
* [Enable `dump()`](#enable-dump)
139139
* [Modify the Default Date and Interval Formats](#modify-the-default-date-and-interval-formats)
140+
* [Quickly disable extensions](#quickly-disable-extensions)
140141

141142
### Filters
142143

@@ -159,7 +160,7 @@ $filter = new Twig_SimpleFilter('rot13', function ($string) {
159160
?>
160161
```
161162

162-
Would be used like this in a pattern:
163+
This filter would be used like this in a pattern:
163164

164165
```twig
165166
{{ bar|rot13 }}
@@ -186,7 +187,7 @@ $function = new Twig_SimpleFunction('boo', function ($string) {
186187
?>
187188
```
188189

189-
Would be used like this in a pattern:
190+
This function would be used like this in a pattern:
190191

191192
```twig
192193
{{ boo("ghost says what?") }}
@@ -218,7 +219,7 @@ $test = new Twig_SimpleTest('red', function ($value) {
218219
?>
219220
```
220221

221-
Would be used like this in a pattern:
222+
This test would be used like this in a pattern:
222223

223224
```twig
224225
{% if shirt is red %}
@@ -308,7 +309,7 @@ if (!class_exists("Project_setdupe_TokenParser")) {
308309
?>
309310
```
310311

311-
Would be used like this in a pattern:
312+
This tag would be used like this in a pattern:
312313

313314
```
314315
{% setdupe name = "Ziggy" %}
@@ -323,6 +324,20 @@ To use `dump()` set `twigDebug` in `config/config.yml` to `true`.
323324

324325
You can modify the default date and interval formats for Twig by editing the `twigDefaultDateFormat` and `twigDefaultIntervalFormat` in `config/config.yml`. Set them to an empty string to use Twig's default formats. **Please note:** both must be set for this feature to work.
325326

327+
### Quickly Disable Extensions
328+
329+
To disable extensions that you're no longer using simply add an underscore to the beginning of a filename and then re-generate your site. For example, the enabled rot13 filter:
330+
331+
source/_twig-components/filters/rot13.filter.twig
332+
333+
And the disabled rot13 filter:
334+
335+
source/_twig-components/filters/_rot13.filter.twig
336+
337+
Then re-generate your Pattern Lab site with:
338+
339+
php core/console --generate
340+
326341
## Available Loaders
327342

328343
If you're building a plugin that will be parsing Twig files you have access to three loaders. It's recommended that you use these instead of accessing Twig directly as these loaders will work with other PatternEngines.

0 commit comments

Comments
 (0)