
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@ismarslomic/sanity-plugin-tag-hierarchy
Advanced tools
A multi-tag input supporting tag hierarchy and tag management
This is a Sanity Studio v3 plugin.
A multi-tag input supporting tag hierarchy (max 2 levels), grouping tagged documents in Desk tool and browsing documents by tags in the Studio.
npm install @ismarslomic/sanity-plugin-tag-hierarchy
Add it as a plugin in sanity.config.ts
(or .js):
import {defineConfig} from 'sanity'
import {tagHierarchy} from 'sanity-plugin-tag-hierarchy'
export default defineConfig({
//...
plugins: [tagHierarchy({})],
})
This plugin supports tag hierarchy of 2 levels: Parent and Child.
A "Parent" Tag is any tag document that does not have the parent field defined.
A "Child" Tag is any tag document with a parent field reference.
Allow selecting multiple tags, but only child tags:
defineField({
name: 'tags',
type: 'array',
of: [
{
type: 'reference',
to: {type: 'tag'},
options: {
filter: 'defined(parent)',
disableNew: true,
},
}
]
})
import { createDeskHierarchy } from 'sanity-plugin-tag-hierarchy'
export default defineConfig({
plugins: [
deskTool({
structure: (S: StructureBuilder, context: StructureResolverContext) => {
return S.list()
.title('Content')
.items([
createDeskHierarchy(S, context.documentStore, 'Tags')
])
},
}),
]
})
MIT © Ismar Slomic
This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.
See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.
We use the Sanity semantic-release to automate publish to NPM.
Make sure to select the main branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.
FAQs
A multi-tag input supporting tag hierarchy and tag management
We found that @ismarslomic/sanity-plugin-tag-hierarchy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.