open-index/open-npm huggingface dataset:
npm package: @headless-route/vite
Description: Vite plugin for integrating headless-route
Author: Beni Arisandi
Latest version: 2.0.3

# @headless-route/vite

[Vite](https://vitejs.dev/) plugin for integrating [`headless-route`](https://github.com/bent10/headless-route/tree/main/packages/core). It offers functions to create routes and navigation routes from the directory structure, loading data, building routes, and serving routes during development.

## Install

```bash
npm create vite@latest
npm i -D @headless-route/vite
```

## Usage

Configure this plugin in your Vite configuration file (`vite.config.js`):

```js
import headlessRoute from '@headless-route/vite'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    headlessRoute({
      dir: 'pages',
      extensions: ['.html', '.md'],
      dataOptions: { dir: 'data' },
      handler: {
        async html(content) {
          // process html content here...
          return content
        },
        // we can define multiple handler
        md: [
          async function markdownHandler(content) {
            // process markdown content here...
            return content
          },
          // The string `'html'` indicates that the html handler will execute
          // after the `markdownHandler` has run!
          'html'
        ]
      }
    })
  ]
})
```

The plugin provides several options for configuring your headless routes:

- `dir`: The root directory for your routes (default: 'pages').
- `dataOptions`: Options for configuring data.
- `handler`: A route handler object where keys are strings starting with a dot (`.`) and values are route handler functions.
- `fallbackRoute`: The fallback route to redirect to if no matching route is found (default: `'/404'`).
- `...routesOptions`: Please refer to [`headless-route`](https://github.com/bent10/headless-route/tree/main/packages/core#api) documentation.

## Related

- [`headless-route`](https://github.com/bent10/headless-route/tree/main/packages/core)

## Contributing

We 💛&nbsp; issues.

When committing, please conform to [the semantic-release commit standards](https://www.conventionalcommits.org/). Please install `commitizen` and the adapter globally, if you have not already.

```bash
npm i -g commitizen cz-conventional-changelog
```

Now you can use `git cz` or just `cz` instead of `git commit` when committing. You can also use `git-cz`, which is an alias for `cz`.

```bash
git add . && git cz
```

## License

![GitHub](https://img.shields.io/github/license/bent10/headless-route)

A project by [Stilearning](https://stilearning.com) &copy; 2024.
npm package: @headless.build/sanity-color-picker
Description: > This is a **Sanity Studio v3** plugin.
Author: Thomas Cristina de Carvalho @klausify
Latest version: 1.1.1

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

## Installation

```sh
npm install @headless.build/sanity-color-picker
yarn add @headless.build/sanity-color-picker
pnpm install @headless.build/sanity-color-picker
```

## Usage

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

```ts
import {defineConfig} from 'sanity'
import {colorPicker} from '@headless.build/sanity-color-picker'

export default defineConfig({
  //...
  plugins: [colorPicker()],
})
```

## License

[MIT](LICENSE) © Thomas Cristina de Carvalho

## Develop & test

This plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)
with default configuration for build & watch scripts.

See [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)
on how to run this plugin with hotreload in the studio.
npm package: @headless.build/sanity-font-picker
Description: > This is a **Sanity Studio v3** plugin.
Author: Thomas Cristina de Carvalho
Latest version: 3.0.1

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

## Installation

```sh
npm install @headless.build/sanity-font-picker
yarn add @headless.build/sanity-font-picker
pnpm install @headless.build/sanity-font-picker
```

## Usage

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

```ts
import {defineConfig} from 'sanity'
import {fontPicker} from '@headless.build/sanity-font-picker'

export default defineConfig({
  //...
  plugins: [fontPicker({})],
})
```

## License

[MIT](LICENSE) © Thomas Cristina de Carvalho

## Develop & test

This plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)
with default configuration for build & watch scripts.

See [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)
on how to run this plugin with hotreload in the studio.
npm package: @headless.build/sanity-plugin-range-slider
Description: > This is a **Sanity Studio v3** plugin.
Author: Thomas Cristina de Carvalho
Latest version: 1.1.1

# @headless.build/sanity-plugin-range-slider

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

## Installation

```sh
npm install @headless.build/sanity-plugin-range-slider
```

## Usage

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

```ts
import {defineConfig} from 'sanity'
import {myPlugin} from '@headless.build/sanity-plugin-range-slider'

export default defineConfig({
  //...
  plugins: [myPlugin({})],
})
```

## License

[MIT](LICENSE) © Thomas Cristina de Carvalho

## Develop & test

This plugin uses [@sanity/plugin-kit](https://github.com/sanity-io/plugin-kit)
with default configuration for build & watch scripts.

See [Testing a plugin in Sanity Studio](https://github.com/sanity-io/plugin-kit#testing-a-plugin-in-sanity-studio)
on how to run this plugin with hotreload in the studio.