Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nochso committed Oct 5, 2015
1 parent afca162 commit 5b8b874
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
[![Latest Stable Version](https://poser.pugx.org/nochso/html-compress-twig/v/stable)](https://packagist.org/packages/nochso/html-compress-twig)
[![License](https://poser.pugx.org/nochso/html-compress-twig/license)](LICENSE)

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

Currently supported twig features are:
Currently supported Twig features are:

* Tags
* Tag
* `{% htmlcompress %} ... {% endhtmlcompress %}`
* Function
* `{{ htmlcompress('some html') }}`
* Filter
* `{{ content|markdown|htmlcompress }}`

The HTML, inline CSS and Javascript will be compressed.
Any HTML, inline CSS and Javascript will be compressed.

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

```
// layout.twig
{% htmlcompress %}
...
{% endhtmlcompress %}
{% htmlcompress %}{% endhtmlcompress %}
{{ htmlcompress('<ul> <li>') }}
{{ '<ul> <li>'|htmlcompress }}
```

**Compression is disabled by Twig's `debug` setting.** This is to make development easier, however you can always
Expand All @@ -57,7 +60,7 @@ $twig->addExtension(new \nochso\HtmlCompressTwig\Extension(true));

## History

### 0.1.0 - 2015-10-??
### 0.1.0 - 2015-10-05
First public release.

## License
Expand Down

0 comments on commit 5b8b874

Please sign in to comment.