New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sanity-plugin-dashboard-widget-gatsby

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanity-plugin-dashboard-widget-gatsby

Sanity Studio Dashboard Widget for triggering Gatsby builds

  • 1.0.9
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-45.16%
Maintainers
1
Weekly downloads
 
Created
Source

Sanity Dashboard Widget: Gatsby

Sanity Studio Dashboard Widget for triggering Gatsby Cloud Preview instances/sites.

Installing

Install the dashboard plugin

To get dashboard support in Sanity Studio in general:

sanity install @sanity/dashboard

Install the Gatsby widget plugin

sanity install dashboard-widget-gatsby

Configuring

  1. Implement your own dashboardConfig. In your sanity.json file, append the following line to the parts array:
{
  "implements": "part:@sanity/dashboard/config",
  "path": "src/dashboardConfig.js"
}
  1. Create the file src/dashboardConfig.js and include the gatsby widget config like this:
export default {
  widgets: [
    {
      name: 'gatsby',
      options: {
        sites: [
          {
            siteUrl: '<siteUrl>',
          }
        ]
      }
    }
  ]
}

Widget options

  • siteUrl - The Gatsby Cloud Preview instance/site url

Developing on this module

To simulate using your development version as a real module inside a studio, you can do the following:

  • Run npm install && npm link from the root of this repository.
  • Run npm run watch to start developing and build the module when changes are made.
Displaying your development version inside a studio

With the mono-repo's test-studio:

  • Bootstrap the monorepo: npm run bootstrap
  • Add sanity-plugin-dashboard-widget-gatsby with the current version number to package.json in the test-studio root folder (but don't run npm install afterwards)
  • Run npm link sanity-plugin-dashboard-widget-gatsby inside the mono-repo's root.
  • Restart the test-studio

With a regular Sanity Studio:

  • Run npm install
  • Add sanity-plugin-dashboard-widget-gatsby with the current version number to package.json.
  • Run npm link sanity-plugin-dashboard-widget-gatsby
  • Start the studio

When you are done and have published your new version, you can run npm unlink inside this repo, and npm unlink sanity-plugin-dashboard-widget-gatsby inside the mono-repo or studio to get back to the normal state. Then run npm run bootstrap for the mono-repo or npm install inside the regular studio to use the published version.

Keywords

FAQs

Package last updated on 20 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc