Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden status for articles #1965

Closed
rr- opened this issue May 28, 2016 · 13 comments
Closed

Hidden status for articles #1965

rr- opened this issue May 28, 2016 · 13 comments
Labels
enhancement stale Marked for closure due to inactivity

Comments

@rr-
Copy link
Contributor

rr- commented May 28, 2016

I hesitated before creating this issue, since there are at least two workarounds for this:

  • Changing file extension to something like .md~
  • Just using status: draft

But hidden has a slightly different semantic value than draft, plus if pages can be hidden (without the notion of being a draft), why can't some posts too? I believe combining draft and hidden status to be an alias of each other would be pretty reasonable.

@rr- rr- changed the title (Features request) Status "hidden" for posts (Feature request) Status "hidden" for posts Jun 8, 2016
@ingwinlu
Copy link
Contributor

what would a hidden post do?

@rr-
Copy link
Contributor Author

rr- commented Jun 24, 2016

Personally I'd like to mark some old posts as hidden so that they no longer appear on the main site (obsolete information etc.), but I can access them in the file system.

@iKevinY
Copy link
Member

iKevinY commented Jun 24, 2016

Semantically, I think there's two distinct ideas being discussed here. Like with pages, a hidden post would be generated but not included in the index page (and perhaps the archive as well). In other words, you could still link to a hidden post via example.com/blog/2016/06/my-post/, much like you can link to a hidden page via example.com/page.

On the other hand, there could also be an unpublished status, where Pelican would ignore the file completely. One possible use case for this could be people who keep their Pelican content in a Git repository that automatically builds on pushes; this would allow them to iteratively work on a post without pushing anything new to their live site. It's pretty niche, but I think having a unpublished → draft → published "workflow" could be valuable.

@justinmayer justinmayer changed the title (Feature request) Status "hidden" for posts Hidden status for articles Sep 27, 2016
@alexwlchan
Copy link
Contributor

I’ve been working around this with some ropey template code and monkey-patching bits of the feed generator. I’d be happy to have a go at incorporating this into Pelican core, if nothing else so I can tidy up my local install. :-)

I don’t have much free time this weekend, but I’ll try to put a patch together at some point.

@justinmayer
Copy link
Member

@rr- / @alexwlchan: Is this something you would like to work on implementing?

@Telofy
Copy link

Telofy commented May 25, 2019

+1. My hack for now: I’ve set the article to draft and then configured a permanent redirect from the old URL to the draft URL in the Nginx I use to serve the files.

@avaris
Copy link
Member

avaris commented May 25, 2019

@Telofy you can setup DRAFT_URL/DRAFT_SAVE_AS same as ARTICLE_* to get rid of redirects.

EDIT: If you want to have unpublished like status where they are completely ignored then you could assign an extension (e.g. somearticle.rst.unpublished) to it and use IGNORE_FILES setting.

@Telofy
Copy link

Telofy commented May 27, 2019

@avaris, thank you! That’s very convenient! (Since no one knows the slugs of new actual drafts, they remain hidden too.)

@justinmayer
Copy link
Member

This issue has been around for a while without much movement. If someone wants to submit a proposed implementation, we are happy to review pull requests.

@justinmayer
Copy link
Member

Since @GiovanH has expressed an interest in implementing Status: hidden for articles, I am re-opening this issue.

If anyone is currently using Status: hidden for articles (which reportedly causes articles not to be generated at all), then I suggest finding another solution, since that seems like unintended behavior that I don't feel we need to preserve.

@justinmayer justinmayer reopened this Apr 16, 2021
@GiovanH GiovanH mentioned this issue Apr 17, 2021
4 tasks
@GiovanH
Copy link
Contributor

GiovanH commented Apr 17, 2021

#2866 is ready for review, although I'll poke at it a couple more times for hardening's sake.

@stale
Copy link

stale bot commented Jun 16, 2021

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 participation and understanding.

@stale stale bot added the stale Marked for closure due to inactivity label Jun 16, 2021
@avaris
Copy link
Member

avaris commented Jun 16, 2021

Fixed in #2866 via add3628.

@avaris avaris closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement stale Marked for closure due to inactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants