Giter Site home page Giter Site logo

greenhouse's Introduction

Deprecated. Please visit the lighthouse-plugin-greenhouse repo

https://github.com/thegreenwebfoundation/lighthouse-plugin-greenhouse


# Greenhouse - Lighthouse, but for web that doesn't use fossil fuels

Lighthouse is a nice tool for helping you workout how to make a site more accessible, performance or mobile friendly.

But given climate change is a thing, what about making websites planet friendly too?

### The general plan

- Point lighthouse at a url.
- Analyse the rendered page
- See which domains in use run on renewable power, by checking against the Green Web Foundation API, or seeing what's returned at `carbon.txt`
- Compile this info into information you could present in a lighthouse run, so tools that provide lighthouse as a service can _also_ do this.

### Usage

```
node index.js https://domain.com/some-page/
```

This will generate a file, `lighthouse-check-output.json` listing all the domains, as well as whether each domain referenced in the site is green, or grey.

### Other bits that would be cool

If take a second to consider that sending data users servers and networks, which use electricity, which is mostly generated by burning fossil fuels, then it means that *page weight budgets are defacto carbon budgets*. Yes, there is a moral argument for WPO!

Also, so we know that a site we can to connect to can be green or not. But what about the hops in between?

Try this:

```
node tracingCheck.js domain.com
```

It'll create a json file, called `domain.com-latlngs.json`, showing the hops along the way, and whether they're green or grey.

greenhouse's People

Contributors

dependabot[bot] avatar arendjantetteroo avatar mrchrisadams avatar

Stargazers

Natalie Hollier avatar Yvonne avatar Holly F. Hudson avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

prototypefund

greenhouse's Issues

Make this an actual custom audit for lighthouse

After reading up a bit more, I think the proper way to do this is make this custom audit, so the checks on domains can be presented using the cool scoring thing, and people can incorporate it as simply as calling npm install some-greenhouse-npm-thingo.

This tutorial outlines the steps:
https://www.aymen-loukil.com/en/blog-en/google-lighthouse-custom-audits/

But…

Every time I tried making this, I've missed something obvious, and the way I'm looking through the artefacts in the code seems to be different to what the custom audit suppports.

But I'm pretty sure it can be done, and it shouldn't be all that complicated (hoho)/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.