WeSearch

How I build an unpublish and archive workflow in Sanity

·5 min read · 0 reactions · 0 comments · 31 views
#build#unpublish#archive#workflow#sanity
How I build an unpublish and archive workflow in Sanity
TL;DR · WeSearch summary

That's fine for a quick takedown, but it doesn't tell you why the document is off the site, and it gives editors no way to distinguish 'needs rework' from 'permanently retired'. Here's the three-action workflow I land on for most client projects: Unpublish, Archive, and Restore — all without touching the delete button. Why not just delete Deletion is irreversible without a dataset export.

Key facts
Original article
DEV.to (Top)
Read full at DEV.to (Top) →
Opening excerpt (first ~120 words) tap to expand

try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 2638501) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Nayan Kyada Posted on Jun 30 • Originally published at nayankyada.com How I build an unpublish and archive workflow in Sanity #sanitycms #groq #sanitystudio #nextjs The default Sanity unpublish document action does one thing: it unpublishes and leaves a draft sitting in the Studio. That's fine for a quick takedown, but it doesn't tell you why the document is off the site, and it gives editors no way to distinguish 'needs rework' from 'permanently retired'.

Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from DEV.to (Top)