dgsiegel / kirby-tidy-html
Tidy HTML output for Kirby
Installs: 48
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Type:kirby-plugin
Requires
- ext-tidy: *
- getkirby/composer-installer: ^1.2
This package is auto-updated.
Last update: 2025-04-29 01:13:31 UTC
README
Tidy HTML output for Kirby
Installation
Requirements
You’ll need the PHP tidy extension installed and loaded. You can check whether this is the case with the following command:
php -r "var_dump(extension_loaded('tidy'));"
Installation with composer
composer require dgsiegel/kirby-tidy-html
Add as git submodule
git submodule add https://github.com/dgsiegel/kirby-tidy-html.git site/plugins/kirby-tidy-html
Download manually
Download and copy this repository to site/plugins/kirby-tidy-html
.
Options
The default values of the package are:
Option | Default | Description |
---|---|---|
dgsiegel.kirby-tidy-html.enabled | false | Enable/disable tidy |
dgsiegel.kirby-tidy-html.options | [] | Tidy options |
Find all available Tidy options here: https://api.html-tidy.org/tidy/quickref_next.html
Usage
return [ 'dgsiegel.kirby-tidy-html.enabled' => true, 'dgsiegel.kirby-tidy-html.options' => [ 'drop-empty-paras' => 0, 'indent' => 2, 'indent' => 2, 'indent-spaces' => 2, 'indent-spaces' => 2, 'output-html' => 1, 'preserve-entities' => 1, 'priority-attributes' => 'id, class, name, src, alt', 'quote-ampersand' => 0, 'sort-attributes' => 0, 'vertical-space' => 1, 'wrap' => 0, ], ];