A Grow extension to pretty format HTML.
Grow 0.5.1 or higher
- Create an
extensions.txt
file within your pod. - Add to the file:
git+git://github.com/luisvillalba/grow-ext-html-beautifier
- Run
grow install
. - Add the following section to
podspec.yaml
:
ext:
- extensions.html_min.HtmlBeautifierExtension
You can also specify custom parameters in your podspec:
- tab_size (Default 2): Tab size in spaces.
- trigger (Default False):
When set to True, only documents containing
html_beautify: True
will be beautified. If False, it will beautify all your .html files. - strict_validation (Default True): When set to True, a strict HTML5 validation will be done on every page. If errors are found, it will raise an exception and cancel the build.
Example:
ext:
- extensions.html_beautifier.HtmlBeautifierExtension:
options:
tab_size: 2
trigger: True
strict_validation: False
Set up a development environment.
git clone https://github.com/luisvillalba/grow-ext-html-beautifier.git
cd example/
grow install && grow build