@akcybex/sanity-netlify-tool
v1.0.6
Published
Sanity netlify tool
Downloads
32
Readme
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,
})
// ...
],
})