Socket
Book a DemoInstallSign in
Socket

@kaliber/sanity-plugin-nav-extend

Package Overview
Dependencies
Maintainers
10
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaliber/sanity-plugin-nav-extend

Extends the nav bar of Sanity Studio

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
10
Created
Source

Sanity plugin nav extend

Extends the nav bar of Sanity Studio

Installation

> yarn add @kaliber/sanity-plugin-nav-extend

config/default.js

{
  kaliber: [
    compileWithBabel: [
      /@kaliber\/sanity-plugin-nav-extend/,
      ...
    ],
    ...
  ],
  ...
}

admin/sanity.config.js

Minimal version

defineConfig({
    ...

    plugins: [
      sanityPluginNavExtend({ clientConfig, reportError }),
      ...
    ],
})

Showing a context switch (e.g. language switch)

defineConfig({
    ...

    plugins: [
      sanityPluginNavExtend({
        contextSwitch: {
          profileKey: 'language',
          options: Object.values(clientConfig.multiLanguage.languages).map(
            ({ flagIcon, title, language }) => ({
              id: language,
              label: title,
              icon: <Flag country={flagIcon} />,
            })
          ),
          defaultValue: clientConfig.multiLanguage.defaultLanguage,
        },
        clientConfig,
        reportError
      }),
      ...
    ],
})

Development

> yarn
> yarn link
project/> yarn link @kaliber/sanity-plugin-nav-extend
project/> yarn add @kaliber/sanity-plugin-nav-extend@link:./node_modules/@kaliber/sanity-plugin-nav-extend

Publish

yarn publish
git push
git push --tags

Disclaimer

This library is intended for internal use, we provide no support, use at your own risk.

Keywords

sanity

FAQs

Package last updated on 30 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts