npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sanity-lighthouse-plugin

v1.1.1

Published

<img width="1295" alt="Sanity Lighthouse in use" src="https://github.com/Halo-Lab/sanity-lighthouse-plugin/assets/342951/4fa7137b-0e35-4370-9f5f-68de77cd99bc">

Downloads

27

Readme

Sanity PageSpeed Monitoring Plugin (for Sanity Studio v3)

This plugin is for Sanity Studio v3 and uses the PageSpeed Insights API to provide insights into the speed and performance of your website. To use this plugin, you will need to have an API key for the PageSpeed Insights API.

Get your credentials here

To use the PageSpeed Insights API, you will need to obtain an API key. You can get your API key by following the instructions provided in the PageSpeed API documentation.

Additionally, if you use Gmail for your Google account, you may need to generate an app password to use as your API key. Instructions for generating app passwords can be found in Google's support documentation.

API key will allow the Sanity Page Speed plugin to access the PageSpeed Insights API and provide speed and performance insights for your website.

Installation

To install this plugin, use the following command:

npm install sanity-lighthouse-plugin

Usage

To use this plugin, add it as a plugin in your sanity.config.ts (or .js) file, as shown in the example below:

import {defineConfig} from 'sanity'
import {lighthousePlugin} from 'sanity-lighthouse-plugin'

export default defineConfig({
  // ...
  plugins: [lighthousePlugin()],
})

After adding the plugin, you can access it by opening the "Page Speed" tab in the Sanity Studio. On this page, you'll need to enter the API key you generated (as described above) within the modal window. After that, you can enter the URL of the page you want to analyze and click "Run Analysis" to get insights into the speed and performance of your website.

Acknowledgments

This plugin uses the PageSpeed Insights API by Google to provide insights into website speed and performance.

Develop & test

This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.

See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.