1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00
seirdy.one/.lighthouserc.yml
2020-12-28 15:32:52 -08:00

61 lines
2.1 KiB
YAML

---
ci:
assert:
preset: lighthouse:recommended
assertions:
installable-manifest: "off" # not a PWA
offline-start-url: "off" # not a PWA
performance-budget: "error"
render-blocking-resources:
- warn
# the CSS file.
# My site doesn't use JS so it doesn't use the recommended async hack
- maxLength: 1
timing-budget: "off" # buggy; manually use the below assertions instead
# https://seirdy.one/2020/11/23/website-best-practices.html#about-lazy-loading
speed-index:
- warn
- maxNumericValue: 2000
largest-contentful-paint:
- warn
- maxNumericValue: 2000
first-contentful-paint:
- warn
- maxNumericValue: 2000
first-meaningful-paint:
- warn
- maxNumericValue: 2000
total-blocking-time:
- warn
- maxNumericValue: 0
cumulative-layout-shift:
- warn
- maxNumericValue: 0
collect:
method: node
settings:
budgetPath: budget.json
chromeFlags: "--disable-gpu --no-sandbox --disable-extensions --no-first-run --headless"
skipAudits:
- robots-txt # Lighthouse bug: CSP makes this impossible
- canonical # staging site has no rel=canonical
- is-crawlable # staging site isn't crawlable
- service-worker # not a PWA
- works-offline # not a PWA
- installable-manifest # not a PWA
- splash-screen # not a PWA
- themed-omnibox # not a PWA
- offline-start-url # not a pwa
- offscreen-images # antipattern: see my articlec on best practices for textual websites
throttling:
cpuSlowdownMultiplier: 1.2 # seems about right on builds.sr.ht
throttlingMethod: devtools
url:
- https://staging.seirdy.one/
- https://staging.seirdy.one/about.html
- https://staging.seirdy.one/2020/11/23/website-best-practices.html
numberOfRuns: 3
upload:
outputDir: lighthouse-reports
reportFilenamePattern: lighthouse-report-%%PATHNAME%%.%%EXTENSION%%
target: filesystem