{"action":"created","issue":{"url":"https://api.github.com/repos/mattgemmell/Jekyll-Staging/issues/3","labels_url":"https://api.github.com/repos/mattgemmell/Jekyll-Staging/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/mattgemmell/Jekyll-Staging/issues/3/comments","events_url":"https://api.github.com/repos/mattgemmell/Jekyll-Staging/issues/3/events","html_url":"https://github.com/mattgemmell/Jekyll-Staging/issues/3","id":56946054,"number":3,"title":"Maybe make staging stateful","user":{"login":"mattgemmell","id":144873,"avatar_url":"https://avatars.githubusercontent.com/u/144873?v=3","gravatar_id":"","url":"https://api.github.com/users/mattgemmell","html_url":"https://github.com/mattgemmell","followers_url":"https://api.github.com/users/mattgemmell/followers","following_url":"https://api.github.com/users/mattgemmell/following{/other_user}","gists_url":"https://api.github.com/users/mattgemmell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattgemmell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattgemmell/subscriptions","organizations_url":"https://api.github.com/users/mattgemmell/orgs","repos_url":"https://api.github.com/users/mattgemmell/repos","events_url":"https://api.github.com/users/mattgemmell/events{/privacy}","received_events_url":"https://api.github.com/users/mattgemmell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"mattgemmell","id":144873,"avatar_url":"https://avatars.githubusercontent.com/u/144873?v=3","gravatar_id":"","url":"https://api.github.com/users/mattgemmell","html_url":"https://github.com/mattgemmell","followers_url":"https://api.github.com/users/mattgemmell/followers","following_url":"https://api.github.com/users/mattgemmell/following{/other_user}","gists_url":"https://api.github.com/users/mattgemmell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattgemmell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattgemmell/subscriptions","organizations_url":"https://api.github.com/users/mattgemmell/orgs","repos_url":"https://api.github.com/users/mattgemmell/repos","events_url":"https://api.github.com/users/mattgemmell/events{/privacy}","received_events_url":"https://api.github.com/users/mattgemmell/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-02-08T09:52:58Z","updated_at":"2015-02-08T13:49:54Z","closed_at":"2015-02-08T13:49:54Z","body":"When staging, we could write out a `.jekyll-staging-active` file into the site root, containing YAML showing the original path of the currently-staged draft, and its current staged path (in _posts).\r\n\r\nWhen unstaging, we'd remove that file. If the raw unstage command was used, without a filename glob, we could preferentially act on the post specified in the `-active` file. This would help ensure that staging and unstaging are symmetrical operations.\r\n\r\nIf staging was attempted and we already find an `-active` file, we could warn and ask the user if they want to continue regardless. Other programs/gems/plugins could also use the `-active` file as an indicator of whether staging is currently enabled, and customise their functionality appropriately.\r\n\r\nI don't see this being a problem for source control, since presumably users aren't going to do a commit whilst staging anyway (since all their posts will have been temporarily moved aside).\r\n\r\nThoughts welcomed."},"comment":{"url":"https://api.github.com/repos/mattgemmell/Jekyll-Staging/issues/comments/73411521","html_url":"https://github.com/mattgemmell/Jekyll-Staging/issues/3#issuecomment-73411521","issue_url":"https://api.github.com/repos/mattgemmell/Jekyll-Staging/issues/3","id":73411521,"user":{"login":"mattgemmell","id":144873,"avatar_url":"https://avatars.githubusercontent.com/u/144873?v=3","gravatar_id":"","url":"https://api.github.com/users/mattgemmell","html_url":"https://github.com/mattgemmell","followers_url":"https://api.github.com/users/mattgemmell/followers","following_url":"https://api.github.com/users/mattgemmell/following{/other_user}","gists_url":"https://api.github.com/users/mattgemmell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattgemmell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattgemmell/subscriptions","organizations_url":"https://api.github.com/users/mattgemmell/orgs","repos_url":"https://api.github.com/users/mattgemmell/repos","events_url":"https://api.github.com/users/mattgemmell/events{/privacy}","received_events_url":"https://api.github.com/users/mattgemmell/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T13:49:53Z","updated_at":"2015-02-08T13:49:53Z","body":"Went ahead with just doing a filesystem check in https://github.com/mattgemmell/Jekyll-Staging/commit/153547b797b38d957abfc21b395282ea9f6c38bc"}}