Shopify + Sanity: Read about the investment and partnership –>

Referenced By

By Natalie Marleny

Plugin to see which documents reference a particular document


Plugin to see which documents reference a particular document


Video Alt Text: Demonstration of the Referenced-by Plugin

Getting started

  1. Have an existing 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": [
  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.component(ReferencedByView).title('Referenced by'),

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

Please note that 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 Studio Project - "Referenced By" plugin tab appears

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


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


MIT © Indent Inc

Install command

yarn add @indent-oss/sanityio-referenced-by