open-index/open-npm huggingface dataset:
npm package: @orangelogic/sanity-plugin-asset-source-cortex
Description: > This is a **Sanity Studio v3** plugin for the Cortex Asset Source. It allows you to use Cortex Generic Asset Browser with Sanity.
Author: Orange Logic Dev Team
Latest version: 1.0.1-ci0005

# sanity-plugin-asset-source-cortex

> This is a **Sanity Studio v3** plugin.

## What is it?

Plugin for [Sanity Studio](https://www.sanity.io) providing asset source for retrieving images from OrangeDam!

## Installation

Using npm:

```
$ npm i @orangelogic/sanity-plugin-asset-source-cortex
```

or

```
yarn add @orangelogic/sanity-plugin-asset-source-cortex
```

## Usage

Add it as a plugin in sanity.config.ts (or .js), with the `baseUrl` is the url of your OrangeDAM

```js
import { cortexAssetBrowser } from "@orangelogic/sanity-plugin-asset-source-cortex"

export default createConfig({
  // ...
  plugins: [
    cortexAssetBrowser({
      baseUrl: "https://<your-orange-dam-url>"
    }),
  ],
});
```

## Develop & test

Make sure to run `npm run build` once, then run

```bash
npm run link-watch
```

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

```bash
npx yalc add sanity-plugin-asset-source-cortex --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](https://github.com/sanity-io/plugin-kit)
with default configuration for build & watch scripts.

## License

[MIT](LICENSE) © Orange Logic