Hey, Prismic community! Is there any way to find/query all instances of a particular slice across published documents? We're looking to retire/replace certain slices across hundreds of documents; we don't know whether they're being used anywhere, and if so, where. It looks like this has been requested before (please add another vote to the tally for me). Ideally this could be done via the UI, but if there's a more technical option in the meantime, I want to know about it!
Hey @dan.duett,
There is no way to do this in the UI. A technical solution would look very similar to the broken links solution. It would actually be a much shorter script. Let me know if it would be helpful for me to write an example script, and I can send it along tomorrow or Wednesday.
Best,
Sam
An example script would be very helpful, Sam! I really appreciate you helping us systematically audit our existing Prismic content.
Hey @dan.duett,
Here you go. Let me know if the script gives you any troubles.
https://stackblitz.com/edit/node-xztcnh?file=index.js
Sam
Thank you, Sam! I look forward to sharing this with my team and will let you know if I have any questions. I think this will really help us with current and future content audits.
@dan.duett Glad to hear it! Feel free to re-open this thread if you have any further questions.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
Taking this lead I created a Dashboard that helps the team so much.
Very cool, Mohammad! Thank you for sharing this
My hope is that the Prismic UI eventually makes this clearer, right out of the box, but this is a great solution for folks who need something now/today. Kudos!
Hey team, I finally got around launching a free tool that does what Dan asked. Hope it's helpful!
That's amazing! Thanks for sharing, Kris.