Sanity plugin for viewing resources which reference a particular resource.

Overview

@indent-oss/sanityio-referenced-by

Plugin to see which documents reference a particular document

referenced-by-sanityio

referenced-by-sanityio.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

You might also like...

Reference for How to Write an Open Source JavaScript Library - https://egghead.io/series/how-to-write-an-open-source-javascript-library

Reference for How to Write an Open Source JavaScript Library The purpose of this document is to serve as a reference for: How to Write an Open Source

Dec 24, 2022

Modern Spatial Reference System Class. Supports EPSG Codes, PROJ4 String, and Well-Known Text.

spatial-reference-system Modern Spatial Reference System Class. supports EPSG Codes PROJ4 Strings ESRI and OGC Well-Known Text PRJ File install npm in

Jul 22, 2022

ParkyDB - block based, linkable and verifiable document database -- javascript reference implementation

ParkyDB - block based, linkable and verifiable document database -- javascript reference implementation

Ancon ParkyDB A data mesh database using Web 3.0 technology Note: Requires Node v17.7.2 and up for development More about data mesh architecture Block

Aug 16, 2022

The Next.js reference implementation on how to design better APIs

The Next.js reference implementation on how to design better APIs

This is the Next.js reference implementation of my blog bost on How to design better APIs. Getting Started Clone the repository git clone https://gith

Nov 22, 2022

The reference LRB-USDL arbitrage bot implementation, built with neon-js.

README Introduction arby is the reference arbitrage bot for Lyrebird. arby is able to run at a profit because Lyrebird swaps LRB and USDL based on the

May 9, 2022

🎹 Memorize piano scales with ease! A music practice program w/ MIDI support. Consider it an interactive reference manual

🎹 Memorize piano scales with ease! A music practice program w/ MIDI support. Consider it an interactive reference manual

Piano Trainer Learn to play the piano at your own pace through various modes of practice. Watch the video Features MIDI compatible Home row keyboard i

Dec 21, 2022

A Complete Javascript Learning Reference Guide.

Learn Javascript A Javascript Reference Repository, which was initially created for my refernce is now open. Any one can Learn and Add more Content to

Oct 26, 2022

Stacks Voice is a reference project that builds on the SIP018 signed structured data standard to create an accountless internet forum.

Stacks Voice Stacks Voice is a reference project that builds on the SIP018 signed structured data standard to create an accountless internet forum. Th

Dec 21, 2022

A new Node.js resource built using Gatsby.js with React.js, TypeScript, and Remark.

Nodejs.dev Nodejs.dev site built using Gatsby.js with React.js, TypeScript, SCSS, and Remark. You can find the latest Figma design protype here. 🚀 Ge

Jan 5, 2023
Comments
  • chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /example

    chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /example

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Weak references

    Weak references

    When the reference field is set to weak and the document being referenced is unpublished, the list of references shows as empty. Is there any workaround for this?

    Thank you!

    opened by rcobiella 0
  • Rename the Structure Builder config file

    Rename the Structure Builder config file

    Description

    This doesn’t fix anything in the plugin, but it updates the file name—as well as all of its references—to follow Sanity’s default file name referenced in their documentation (see https://www.sanity.io/docs/set-up-structure-builder-to-override-the-default-list-view).

    Something small that I didn’t notice right away when following the plugin installation instructions, but hopefully should help future users!

    Type of change

    • [x] Bug fix (non-breaking change that fixes an issue)
    • [ ] New feature (non-breaking change that adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

    Fixes

    • ID-1

    Checklists

    • [x] Pull request has a descriptive title and summary.
    • [ ] Pull request has been linked to Jira.
    • [ ] Pull request has reviewers assigned.
    opened by ryanleichty 0
  • chore(deps): bump terser from 5.14.0 to 5.14.2 in /example

    chore(deps): bump terser from 5.14.0 to 5.14.2 in /example

    Bumps terser from 5.14.0 to 5.14.2.

    Changelog

    Sourced from terser's changelog.

    v5.14.2

    • Security fix for RegExps that should not be evaluated (regexp DDOS)
    • Source maps improvements (#1211)
    • Performance improvements in long property access evaluation (#1213)

    v5.14.1

    • keep_numbers option added to TypeScript defs (#1208)
    • Fixed parsing of nested template strings (#1204)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Cache Solidjs resources by key (derived from the resource source)

Solid Cached Resource (Experimental) Create a solid resource attached to a cached state by a unique key. Heavily inspired by react-query, but for soli

Yonatan 27 Dec 31, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Incredible resources (with links) to help up-skill yourselves on various fields. Resources like programming, designing, engineering and much more and completely Open Source.

Shiryoku Incredible resources (with links) to help up-skill yourselves on various fields. Resources like programming, designing, engineering and much

Kunal Keshan 22 Dec 15, 2022
Manage GitHub resources like repositories, teams, members, integrations and workflows with the AWS CDK as Custom Resources in CloudFormation.

CDK Github Manage GitHub resources like repositories, teams, members, integrations and workflows with the AWS CDK as Custom Resources in CloudFormatio

Pepperize 8 Nov 25, 2022
The BrewDog Beer Guide is a web application for beer lovers, in particular those who like the BrewDog brewery.

Brewdog-Beer-Guide The BrewDog Beer Guide is a web application for beer lovers, in particular those who like the BrewDog brewery. Here you find the de

Tiago Lelinski Marin 3 Sep 13, 2022
A jQuery Plugin for viewing pictures like Wechat moments

A jQuery Plugin for viewing pictures like Wechat moments

馒头饭 25 Nov 10, 2022
Enhanced Sanity.io plugin development experience.

@sanity/plugin-kit NOTE This is a developer preview package meant for Sanity Studio v3 plugin development. For a v2 alternative, consider using Sanipa

Sanity 40 Dec 27, 2022
An easy-to-read, quick reference for JS best practices, accepted coding standards, and links around the Web

Feel free to contribute! Where? http://www.jstherightway.org Why? Today we have a bunch of websites running JavaScript. I think we need a place to put

BrazilJS 8.5k Jan 1, 2023