If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
This is a DDEV addon to run Unlighthouse in your site. Unlighthouse is a tool to scan your entire site with Google Lighthouse in 2 minutes (on average).
This is optimized for Aljibe projects, but can be used in any DDEV project.
Install this addon:
For DDEV v1.23.5 or above run
ddev add-on get Metadrop/ddev-unlighthouse
For earlier versions of DDEV run
ddev get Metadrop/ddev-unlighthouse
Once installed, make sure to restart your ddev project:
ddev restart
This addon uses the tests/[local|pro|....]/unlighthouse.ts configuration file to customize tests according to your needs. You can modify this file following Unlighthouse configuration guidelines.
To execute unlighthouse tests, simply access your ddev environment and run any of this commands:
unlighthouse: Run tests and browse them live at https://$DDEV_HOSTNAME:5678unlighthouse-ci: Run tests and generate a static report in reports/unlighthouse folderddev [unlighthouse|unlighthouse-ci] <folder>[local|pre|pro...]
Because of CORS restrictions, reports must be accessed via an HTTP server. To do this, you need to adjust the unlighthouse configuration and provide ddev’s URL. See unlighthouse/unlighthouse.ts for reference.
Once unlighthouse reports are generated, you can review them to identify areas for improvement in performance, accessibility, and more of your website.
Happy optimization!
This addon uses a Docker image from docker-aljibe-tools with a combined tag that encodes both the Unlighthouse version and the base image version:
ghcr.io/metadrop/aljibe-tools/unlighthouse:0.17.2-base1.0.0
The default version is set in docker-compose.unlighthouse.yaml. To use a different version, add the following to .ddev/.env:
UNLIGHTHOUSE_VERSION=0.17.2-base1.0.0
To update to a newer version, reinstall the addon with ddev add-on get Metadrop/ddev-unlighthouse or update UNLIGHTHOUSE_VERSION in .ddev/.env and run ddev restart.
Available versions are listed in the docker-aljibe-tools packages.
Contributed and maintained by @Metadrop
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.