Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paramonovav/spress-html-compress
Compress/minify your HTML
https://github.com/paramonovav/spress-html-compress
compress minify spress
Last synced: about 2 months ago
JSON representation
Compress/minify your HTML
- Host: GitHub
- URL: https://github.com/paramonovav/spress-html-compress
- Owner: paramonovav
- License: mit
- Created: 2016-02-11T21:56:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T19:57:44.000Z (over 4 years ago)
- Last Synced: 2024-05-18T22:03:04.241Z (8 months ago)
- Topics: compress, minify, spress
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Minify HTML
[![Latest Stable Version](https://poser.pugx.org/paramonovav/spress-html-compress/v)](//packagist.org/packages/paramonovav/spress-html-compress) [![Total Downloads](https://poser.pugx.org/paramonovav/spress-html-compress/downloads)](//packagist.org/packages/paramonovav/spress-html-compress) [![Latest Unstable Version](https://poser.pugx.org/paramonovav/spress-html-compress/v/unstable)](//packagist.org/packages/paramonovav/spress-html-compress) [![License](https://poser.pugx.org/paramonovav/spress-html-compress/license)](//packagist.org/packages/paramonovav/spress-html-compress)
![Spress 2 ready](https://img.shields.io/badge/Spress%202-ready-brightgreen.svg)Compress/minify your HTML
### How to install?
Go to your Spress site and add the following to your `composer.json` and run
`composer update`:```json
"require": {
"paramonovav/spress-html-compress": "2.0.*"
}
```### How to use?
Add the following to your config.yml to exclude some files from minify/compress process:
```yaml
html_compress_exclude: ['.htaccess','robots.txt','crossdomain.xml', 'sitemap.xml','nortonsw_bc7be3d0-796e-0.html','BingSiteAuth.xml']
html_compress_exclude_pattern: '/(.*)?\.(jpe?g|png|gif|ico|svg|psd|tiff|webm|mov|avi|mkv|mp4|eot|ttf|otf|woff|woff2|webp)$/i'
```Just run build command:
```bash
spress site:build
```If you want to disable compression use the following config
```yaml
html_compress: false
```