sanity-plugin-vimeo
TypeScript icon, indicating that this package has built-in type declarations

1.5.5 • Public • Published

sanity-plugin-vimeo

This is a Sanity Studio v3 plugin.

Installation

npm install sanity-plugin-vimeo

Config

Add your Vimeo Access Token and/or your Vimeo User ID to your .env

  VIMEO_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
  VIMEO_USER_ID="YOUR USER ID"

Add it as a plugin in sanity.config.ts (or .js):

import {defineConfig} from 'sanity'
import {vimeoField} from 'sanity-plugin-vimeo'

export default defineConfig({
  //...
  plugins: [
    vimeoField({
      accessToken: process.env.VIMEO_ACCESS_TOKEN,
      userID: process.env.VIMEO_USER_ID, // Optional to alter the query to a specific user (typically your own)
    }),
  ],
})

Usage

// … your schema
defineField({
  title: 'Vimeo',
  name: 'vimeo',
  type: 'vimeo',
  // Optional: Extend the default fields, see below for more information
  options: {
    fields: ['metadata'],
  },
})

Options

By default the plugin stores the fields name, pictures, files and link, but you can extend (not overwrite) the fields through the options. Please be sure to add fields as an array of strings. See the vimeo response documentation for a list of available fields.

License

MIT © Dan Gavin

Readme

Keywords

Package Sidebar

Install

npm i sanity-plugin-vimeo

Weekly Downloads

0

Version

1.5.5

License

MIT

Unpacked Size

10.5 MB

Total Files

17

Last publish

Collaborators

  • iamdangavin