- Do you want to request a feature or report a bug?
feature
- What is the current behavior?
Published posts cannot be unpublished.
- What is the expected behavior?
User should be able to unpublish a published post:
IMO, this feels to me like a critically basic action for a CMS. Any action I take, I should be able to undo.
What's really funny is this was actually discussed in the very first CMS issue - check out this comment: https://github.com/netlify/netlify-cms/issues/1#issuecomment-99974145
I discovered on accident that we already have everything we need to do this through what is ultimately a bug: every save in the CMS results in a commit, with or without actual changes to the entry. (And yeah we should fix that.) So currently we can trivially unpublish in the workflow as follows:
This removes the file from the published branch, and leaves the entire entry in the "Draft" column of the workflow. We should probably drop unpublished items in the Ready column instead.
What is the status of this issue? Would love a way to unpublished a post after a fixed amount of time has past. Think expiring job posts.
It's open for anyone to pick up if you're interested in working on it. Note that this ticket would cover manual unpublishing - scheduled publishing, which would pave the way for scheduled unpublishing - is discussed https://github.com/netlify/netlify-cms/issues/263.
Could I take this?
@lizzzp1 all yours! The steps you'll want to take are outlined in a comment above: https://github.com/netlify/netlify-cms/issues/727#issuecomment-350426136
Sent with GitHawk
@erquhart is there a way to run just what you need? Running yarn start that runs everything, but it eats up my cpu :(
@talves any chance this ^^ is due to the new builds? On mobile right now, don't recall how it impacted the dev tasks.
Sent with GitHawk
CPU or the issue itself? Not sure on either one.
Let's bring in the fixes and see if those were causing the issue.
@lizzzp1 we've played with our builds a bit, can you try again and see if the issue persists? It shouldn't be so resource intensive that a reasonably spec'd machine can't handle it. We don't have a great development workflow that doesn't include all modules, unfortunately.
@erquhart will do!
@erquhart it's noticeably better. Thanks!
@erquhart Wondering if I could get a nudge in the right direction in terms of what code this touches and how to test locally. 馃槵 I was trying to test a bit on my site, but not seeing the issue, but maybe I'm just not fully understanding.
You'd need to have some understanding of how the CMS works as a user, specifically the editorial workflow. The workflow allows your entries to be pull requests until you "publish" them, which merges the pull request and generally results in your site rebuilding and the published item going live.
This ticket is about adding "unpublish" functionality for items that are already published, so it will touch the GitHub backend (packages/netlify-cms-backend-github) and probably be triggered through the editor toolbar, where a dropdown currently contains the "publish" command - the toolbar component is here: https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
IMO, this feels to me like a critically basic action for a CMS. Any action I take, I should be able to undo.