softr/phile-page-compressor

PhileCMS 页面压缩插件

安装: 9

依赖: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 1

开放问题: 0

类型:phile-plugin

dev-master 2016-08-15 03:06 UTC

This package is auto-updated.

Last update: 2024-08-29 03:47:37 UTC


README

这是一个用于 Phile 的插件,用于压缩 HTML 输出并减少服务器负载。

1.1 安装(composer)

php composer.phar require softr/phile-page-compressor:*

1.2 安装(下载)

  • 安装最新版本的 Phile
  • 将此仓库克隆到 plugins/softr/pageCompressor

2. 激活

在安装插件后。您需要将以下行添加到您的 config.php 文件中

$config['plugins']['softr\\pageCompressor'] = array('active' => true);

3. 配置

默认情况下,插件设置为使用最大压缩级别。无论如何,您都可以降低或禁用压缩级别。为此,您需要将以下行添加到您的 config.php 文件中

$config['page_compress_level'] = 0,1,2,3 or 4;

使用方法

不同的压缩级别执行以下任务

0 - No Minify
1 - Safe Minify
2 - Extreme Reduce. Minify all
3 - Heavy Reduce. Save pre and code tags
4 - Light Reduce. Minify and keep comments