Necesito Programar Más

    sanity-plugin-asset-source-giphy
    TypeScript icon, indicating that this package has built-in type declarations

    4.0.3 • Public • Published

    sanity-plugin-asset-source-giphy

    NOTE

    This is the Sanity Studio v3 version of sanity-plugin-asset-source-giphy.

    What is it?

    Plugin for Sanity Studio providing asset source for retrieving gifs from Giphy!

    Giphy Asset Source Modal

    Installation

    In your studio folder, run:

    npm install --save sanity-plugin-asset-source-giphy
    

    or

    yarn add sanity-plugin-asset-source-giphy
    

    Usage

    Add it as a plugin in sanity.config.ts (or .js), with a valid Giphy API key:

    apiKey is required,

    import { giphyAssetSourcePlugin } from "sanity-plugin-asset-source-giphy";
    
    export default createConfig({
      // ...
      plugins: [
        giphyAssetSourcePlugin({
          apiKey: "my-api-key"
        }),
      ],
    });

    Changes since previous version

    We made some changes as we wanted the plugin to feel more like giphy's own page. Therefore the old config to opt in to autoplay of gifs is gone. In addition we now preview selected gif with related gifs. All options are no longer available. It was way too much to explain and most will only need a select few.

    Giphy Asset Source Modal

    Develop & test

    Make sure to run npm run build once, then run

    npm run link-watch

    In another shell, cd to your test studio and run:

    npx yalc add sanity-plugin-asset-source-giphy --link && yarn install

    Now, changes in this repo will be automatically built and pushed to the studio, triggering hotreload. Yalc avoids issues with react-hooks that are typical when using yarn/npm link.

    About build & watch

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

    Install

    npm i sanity-plugin-asset-source-giphy

    DownloadsWeekly Downloads

    96

    Version

    4.0.3

    License

    MIT

    Unpacked Size

    252 kB

    Total Files

    31

    Last publish

    Collaborators

    • slem