flownative/neos-compressor

Output compression for Neos

Installs: 72 005

Dependents: 0

Suggesters: 0

Security: 0

Stars: 16

Watchers: 6

Forks: 8

Open Issues: 3

Type:neos-plugin

v2.2.0 2022-08-23 08:19 UTC

This package is auto-updated.

Last update: 2024-10-23 12:51:14 UTC


README

MIT license Packagist Maintenance level: Love

Flownative Neos Compressor

This package by default compresses the head and body of the Neos.Neos:Page prototype using the default compressor of wyrihaximus/html-compress.

Installation

composer require flownative/neos-compressor

Usage

As soon as the package is installed, the Neos.Neos:Page prototype is amended with @process instructions on the head and body elements. This will compress and "regular" output without any further steps to take.

Adjust compression

To remove the default compression, simply override:

prototype(Neos.Neos:Page) {
    head.@process.compression >
    body.@process.compression >
}

To compress specific parts, use the compression helper like this:

something.@process.compression = ${Flownative.Compressor.compress(value)}