Skip to content

Commit

Permalink
Merge pull request pattern-lab#5 from TxHawks/patch-2
Browse files Browse the repository at this point in the history
Correct filenames of Twig extensions
  • Loading branch information
dmolsen committed Dec 7, 2015
2 parents a022c8c + aaba74b commit 3e28821
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -148,7 +148,7 @@ The requirements for using filters with Pattern Lab:
* The filter **must** set the variable `$filter`
* Only one filter per file (_e.g. can only set `$filter` once per file_)

An example function called `rot13.filter.twig` in `source/_twig-components/filters`:
An example function called `rot13.filter.php` in `source/_twig-components/filters`:

```php
<?php
Expand All @@ -175,7 +175,7 @@ The requirements for using functions with Pattern Lab:
* The function **must** set the variable `$function`
* Only one function per file (_e.g. can only set `$function` once per file_)

An example function called `boo.function.twig` in `source/_twig-components/functions`:
An example function called `boo.function.php` in `source/_twig-components/functions`:

```php
<?php
Expand All @@ -202,7 +202,7 @@ The requirements for using tests with Pattern Lab:
* The test **must** set the variable `$test`
* Only one test per file (_e.g. can only set `$test` once per file_)

An example of a simple test called `red.test.twig` in `source/_twig-components/tests`:
An example of a simple test called `red.test.php` in `source/_twig-components/tests`:

```php
<?php
Expand Down Expand Up @@ -254,7 +254,7 @@ Tags are the most complicated extension to set-up with Pattern Lab. Three steps

Pattern Lab takes care of the registering for you based on the file name.

An example of a simple tag called `setdupe.tag.twig` in `source/_twig-components/tags` that mimics the default `set` tag. Please note all of the locations where class names incorporate the filename, `setdupe`.
An example of a simple tag called `setdupe.tag.php` in `source/_twig-components/tags` that mimics the default `set` tag. Please note all of the locations where class names incorporate the filename, `setdupe`.

```php
<?php
Expand Down Expand Up @@ -328,11 +328,11 @@ You can modify the default date and interval formats for Twig by editing the `tw

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:

source/_twig-components/filters/rot13.filter.twig
source/_twig-components/filters/rot13.filter.php

And the disabled rot13 filter:

source/_twig-components/filters/_rot13.filter.twig
source/_twig-components/filters/_rot13.filter.php

Then re-generate your Pattern Lab site with:

Expand Down

0 comments on commit 3e28821

Please sign in to comment.