npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@indent-oss/sanityio-referenced-by

v0.1.4

Published

Plugin for viewing resources which reference a particular resource

Downloads

1,070

Readme

@indent-oss/sanityio-referenced-by

Plugin to see which documents reference a particular document

referenced-by-sanityio

https://user-images.githubusercontent.com/31798108/173065472-95294be4-7fc1-4f19-ba6c-e313c67acbed.mov

Video Alt Text: Demonstration of the Referenced-by Plugin

Getting started

  1. Have an existing Sanity.io Studio Project

  2. Install @indent-oss/sanityio-referenced-by plugin using the command line:

    • NPM
    npm i @indent-oss/sanityio-referenced-by
    • Yarn
    yarn add @indent-oss/sanityio-referenced-by
  3. Add @indent-oss/sanityio-referenced-by to sanity.json "plugins":

  // /sanity.json
  "plugins": [
    "@indent-oss/sanityio-referenced-by"
  ],
  1. Add sanity-structure.js reference to sanity.json "parts":
  // /sanity.json
  "parts": [
    {
      "name": "part:@sanity/desk-tool/structure",
      "path": "./sanity-structure.js"
    }
  ]
  1. Create and/or update sanity-structure.js in the root directory:
// /sanity-structure.js
import {ReferencedByView} from 'part:@indent-oss/sanityio-referenced-by'
import S from '@sanity/desk-tool/structure-builder'

export const getDefaultDocumentNode = () => {
  return S.document().views([
    S.view.form(),
    S.view.component(ReferencedByView).title('Referenced by'),
  ])
}

export default () => S.list().title('Base').items(S.documentTypeListItems())

Please note that Sanity.io Studio requires a title as a property of S in the export default function, but title does not need to be 'Base' for the plugin to work.

  1. Run the Sanity.io Studio Project - "Referenced By" plugin tab appears

The example directory contains an example Sanity.io Studio project which has the @indent-oss/sanityio-referenced-by plugin already installed

Credits

Thank you to Devin Halladay: List Referring Documents (Backlinks) in Sanity

License

MIT © Indent Inc