Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lighthouse to netlify #101

Merged
merged 2 commits into from
Jan 27, 2022
Merged

Conversation

jarrodmillman
Copy link
Member

@jarrodmillman jarrodmillman commented Jan 27, 2022

https://deploy-preview-101--scientific-python-hugo-theme.netlify.app/reports/lighthouse.html

Here is the plugin we are using:
https://github.com/netlify-labs/netlify-plugin-lighthouse

I had to do two things:

  1. Installed plugin in the Netlify UI from this direct in-app installation link.
  2. Add this
[[plugins]]
  package = "@netlify/plugin-lighthouse"

  # optional, fails build when a category is below a threshold
  [plugins.inputs.thresholds]
    performance = 0.6
    accessibility = 0.9
    best-practices = 0.9
    seo = 0.9
    pwa = 0.2

  # optional, deploy the lighthouse report to a path under your site
  [plugins.inputs]
    output_path = "reports/lighthouse.html"

to netlify.toml. I changed performance = 0.9 and pwa = 0.9 to performance = 0.6 and pwa = 0.2 b/c otherwise the CI failed. We should adjust the thresholds as we improve the theme.

@netlify
Copy link

netlify bot commented Jan 27, 2022

✔️ Deploy Preview for scientific-python-hugo-theme ready!

🔨 Explore the source changes: a1687dc

🔍 Inspect the deploy log: https://app.netlify.com/sites/scientific-python-hugo-theme/deploys/61f313df897ced00078fa660

😎 Browse the preview: https://deploy-preview-101--scientific-python-hugo-theme.netlify.app

@jarrodmillman jarrodmillman changed the title Add lighthouse to neflify Add lighthouse to netlify Jan 27, 2022
@tupui
Copy link
Member

tupui commented Jan 27, 2022

Oh sounds better! I did not think about checking such options.

@stefanv stefanv merged commit 7b4ca5a into scientific-python:main Jan 27, 2022
@jarrodmillman jarrodmillman deleted the lighthouse branch May 2, 2022 16:15
@jarrodmillman jarrodmillman added this to the 0.1 milestone Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants