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

Add support for drafts #316

Merged
merged 1 commit into from
Jul 10, 2020
Merged

Conversation

torrocus
Copy link
Contributor

From now, when you run jekyll serve --drafts, your RSS feeds will also contain also drafts posts.
The same behavior is in Jekyll Sitemap.

@torrocus torrocus changed the title Add support to drafts Add support for drafts Jul 10, 2020
@DirtyF
Copy link
Member

DirtyF commented Jul 10, 2020

What's the point of supporting drafts for a local feed?

@torrocus
Copy link
Contributor Author

I think this is useful in the deployment process. It's more convenient to create drafts than real posts to test different things.
When I enable --drafts options, I expect:

  • in the index I will see posts from the _drafts and _posts folders
  • sitemap will contain links to all these posts
  • feed will contain the latest (according to the limit) posts including _drafts folder

At present, this behavior is inconsistent. Index is ok, sitemap is ok.
RSS feed behaves non-intuitively.

@DirtyF DirtyF requested a review from a team July 10, 2020 16:40
Copy link
Member

@DirtyF DirtyF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me.
Does not introduce a new option, and does not add much inventory, while matching with Jekyll's current behavior.

@torrocus
Copy link
Contributor Author

That's what I meant. I wanted to use what Jekyll already has.
And I was surprised that it doesn't work as expected.

@DirtyF
Copy link
Member

DirtyF commented Jul 10, 2020

@jekyll: merge +minor

@jekyllbot jekyllbot merged commit 702dd89 into jekyll:master Jul 10, 2020
jekyllbot added a commit that referenced this pull request Jul 10, 2020
@DirtyF
Copy link
Member

DirtyF commented Jul 10, 2020

@torrocus released in 0.15.0 :shipit:

@meribold
Copy link

meribold commented Jun 8, 2021

Drafts used to be deliberately excluded (see #94 and #95) and I was surprised to suddenly see my drafts in my feed reader. I exclude drafts from my index page and sitemap as well. I mainly have drafts on my public site so I can share them with specific people for proofreading or to confirm that everything looks fine on mobile. The same workflow is described in #94 and lead to the implementation of the old behavior. Presumably I'm not the only person that relied on the old behavior and other people will update jekyll-feed and then be surprised to find that they are advertising their drafts.

meribold added a commit to meribold/meribold.org that referenced this pull request Jun 8, 2021
Version 0.15.1 of jekyll-feed no longer excludes drafts from the feed it
generates.  I don't want my feed to include drafts so I'm downgrading
jekyll-feed.  See <jekyll/jekyll-feed#316>.

This commit also changes the URLs of my drafts by adding a category (see
<https://jekyllrb.com/docs/posts/#categories>).  The reason for doing
this is that I briefly published a feed generated by jekyll-feed 0.15.1
and that I'd rather have links to drafts from that feed yield 404s.
@jekyll jekyll locked and limited conversation to collaborators Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants