Download the PHP package innocode-digital/wp-critical-css-aws-lambda without Composer
On this page you can find all versions of the php package innocode-digital/wp-critical-css-aws-lambda. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innocode-digital/wp-critical-css-aws-lambda
More information about innocode-digital/wp-critical-css-aws-lambda
Files in innocode-digital/wp-critical-css-aws-lambda
Package wp-critical-css-aws-lambda
Short Description Generates critical stylesheets for templates via AWS Lambda.
License GPL-2.0+
Informations about the package wp-critical-css-aws-lambda
AWS Lambda Critical CSS
Description
Generates critical stylesheets for templates via AWS Lambda. See also AWS Lambda Critical CSS.
Install
-
Preferable way is to use Composer:
`
By default, it will be installed as Must Use Plugin. It's possible to control with
extra.installer-paths
incomposer.json
. -
Alternate way is to clone this repo to
wp-content/mu-plugins/
orwp-content/plugins/
:`
If plugin was installed as regular plugin then activate AWS Lambda Critical CSS from Plugins page
or WP-CLI: wp plugin activate wp-critical-css-aws-lambda
.
Usage
Add the following constants to wp-config.php
:
`
Create serverless function on your favorite service. Expected default name is critical-css-production-processor, but you may use any other. There is a prepared function AWS Lambda Critical CSS.
Usage
To generate critical CSS from enqueued styles:
`
Caveats
- Relative paths to custom fonts or images in stylesheets should be changed to absolute:
`
-
This plugin is only for generating and rendering critical CSS, to defer CSS files you may use Deferred loading.
- If page caching is used then you may want to add variable value from cookie in cache key. E.g. for Batcache it's
possible to do with next code before
advanced-cache.php
file is included:
`
All versions of wp-critical-css-aws-lambda with dependencies
ext-json Version *
aws/aws-sdk-php Version ^3.14
composer/installers Version ~1.0
innocode-digital/wp-secrets-manager Version ^1.0
innocode-digital/wp-version Version ^1.0