@akcybex/sanity-netlify-tool

1.0.6 • Public • Published



Total Weekly Downloads Total Downloads Latest Stable Version License

Installation Steps

1. Require the Package

After creating your new/existing Sanity Application you can include the @akcybex/sanity-netlify-tool package with the following command:

npm i @akcybex/sanity-netlify-tool -S

2. Usage

Add set environment variables in your sanity .env.*:

SANITY_STUDIO_NETLIFY_ACCESS_TOKEN=
SANITY_STUDIO_NETLIFY_SITE_ID=

Import and add tool in sanity.config.js file:

// ...
import {netlifyTool} from '@akcybex/sanity-netlify-tool';
import '@akcybex/sanity-netlify-tool/dist/style.css';

// ...
export default defineConfig({
    // ...
    tools: [
        // ...
        netlifyTool({
            accessToken: (import.meta.env || process.env).SANITY_STUDIO_NETLIFY_ACCESS_TOKEN,
            siteId: (import.meta.env || process.env).SANITY_STUDIO_NETLIFY_SITE_ID,
        })
        // ...
    ],
})

Package Sidebar

Install

npm i @akcybex/sanity-netlify-tool

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

1.03 MB

Total Files

7

Last publish

Collaborators

  • awais94
  • muhammadwaqas
  • mtt786