Skip to content

Commit 5b8b874

Browse files
committed
Update readme
1 parent afca162 commit 5b8b874

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
[![Latest Stable Version](https://poser.pugx.org/nochso/html-compress-twig/v/stable)](https://packagist.org/packages/nochso/html-compress-twig)
44
[![License](https://poser.pugx.org/nochso/html-compress-twig/license)](LICENSE)
55

6-
A Twig extension for [WyriHaximus/HtmlCompress](https://github.com/WyriHaximus/HtmlCompress).
6+
A [Twig](http://twig.sensiolabs.org/) extension for [WyriHaximus/HtmlCompress](https://github.com/WyriHaximus/HtmlCompress).
77

8-
Currently supported twig features are:
8+
Currently supported Twig features are:
99

10-
* Tags
10+
* Tag
1111
* `{% htmlcompress %} ... {% endhtmlcompress %}`
12+
* Function
13+
* `{{ htmlcompress('some html') }}`
14+
* Filter
15+
* `{{ content|markdown|htmlcompress }}`
1216

13-
The HTML, inline CSS and Javascript will be compressed.
17+
Any HTML, inline CSS and Javascript will be compressed.
1418

1519
* [Installation](#installation)
1620
* [Usage](#usage)
@@ -38,10 +42,9 @@ $twig->addExtension(new \nochso\HtmlCompressTwig\Extension());
3842
Then use it in your templates:
3943

4044
```
41-
// layout.twig
42-
{% htmlcompress %}
43-
...
44-
{% endhtmlcompress %}
45+
{% htmlcompress %}{% endhtmlcompress %}
46+
{{ htmlcompress('<ul> <li>') }}
47+
{{ '<ul> <li>'|htmlcompress }}
4548
```
4649
4750
**Compression is disabled by Twig's `debug` setting.** This is to make development easier, however you can always
@@ -57,7 +60,7 @@ $twig->addExtension(new \nochso\HtmlCompressTwig\Extension(true));
5760

5861
## History
5962

60-
### 0.1.0 - 2015-10-??
63+
### 0.1.0 - 2015-10-05
6164
First public release.
6265

6366
## License

0 commit comments

Comments
 (0)