Expand my Community achievements bar.

Join expert-led, customer-led sessions on Adobe Experience Manager Assets on August 20th at our Skill Exchange.

Lighthouse report customization idependent of deployment

Avatar

Level 3

Hi Experts,

Could you kindly suggest if deployment independent for more number of pages ( more than 25 pages) same kind of lighthouse report can be generated? It will not be dependent upon AEMaaCS pipeline or deployment.

If yes, kindly share in little details.

Thanks in advance !!

3 Replies

Avatar

Community Advisor

Hi @tb1687196,

Here’s how you can approach it:

Tools/Tech Stack Options
  • Lighthouse CLI (Node.js)

  • Puppeteer + Lighthouse for headless Chrome runs

  • Google PageSpeed Insights API (rate-limited)

  • Lighthouse CI (LHCI) – optional, but useful for tracking history

How to Set It Up (CLI Approach – Deployment Independent)
1. Install Node.js & Lighthouse
npm install -g lighthouse
2. Create a URL List (e.g., urls.txt)
https://your-site/page1.html
https://your-site/page2.html
...
3. Bash Script to Loop Through URLs

#!/bin/bash
mkdir -p lighthouse-reports

while read url; do
  echo "Auditing $url"
  filename=$(echo $url | sed 's|https\?://||' | tr '/:' '_')
  lighthouse "$url" --output html --output-path "./lighthouse-reports/${filename}.html" --chrome-flags="--headless"
done < urls.txt
Benefits
  • No dependency on AEM pipeline or code changes

  • You can run it locally or on any server/VM

  • Supports batch processing

  • Output can be HTML or JSON

  • Easy to customize scoring categories

Alternative: Use Lighthouse CI (Optional for Centralized Reporting)
  • Install: npm install -g @lhci/cli

  • Setup lighthouserc.js with multiple URLs

  • Can generate reports and upload to a custom dashboard or GitHub Pages


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 3

Many thanks @SantoshSai 

for the details. So, to implement the CLI approach you described, need all 4 below? And these are open source?

  • Lighthouse CLI (Node.js)

  • Puppeteer + Lighthouse 

  • Google PageSpeed Insights API 

  • Lighthouse CI (LHCI)  

Avatar

Community Advisor

@tb1687196,

You do not need all 4 tools to implement the CLI-based, deployment-independent Lighthouse reporting.

Here’s what’s actually required and optional:

Required (Open Source)
  1. Lighthouse CLI (Node.js)Yes, required
    This is the main tool that audits pages. It’s open source and can be installed via:

    npm install -g lighthouse
Optional Tools (depending on your needs)
  1. Puppeteer + LighthouseNot required for basic CLI
    Use this only if you need more control (e.g., login automation, custom headers, JS interactions). Otherwise, Lighthouse CLI with --chrome-flags="--headless" is enough.

  2. Google PageSpeed Insights APINot required
    This is an alternative, not a dependency. It uses Lighthouse under the hood, but is rate-limited and better suited for occasional or remote audits.

  3. Lighthouse CI (LHCI)Not required
    Optional if you want centralized tracking, history, or automated runs in CI pipelines. Adds nice dashboards, but not needed for CLI-based reporting.


Santosh Sai

AEM BlogsLinkedIn