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

Filter drafts #333

Open
pgstef opened this issue Jan 29, 2021 · 13 comments
Open

Filter drafts #333

pgstef opened this issue Jan 29, 2021 · 13 comments

Comments

@pgstef
Copy link

pgstef commented Jan 29, 2021

Hi,

I saw in a few closed issues that drafts posts should be filtered out from the generated feed xml. Is it true?
I use github-pages to build my blog, and the show_drafts: true property works using {% if post.draft %} to preview the posts in a drafts section.

However, those drafts are automatically published in the feed.xml too. Is it normal? How to prevent it?
Is it possible to write a custom feed xml file that would automatically be updated when adding new posts (with specific tags)?

I'm probably missing something here.
Many thanks in advance for your help.

@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@pgstef
Copy link
Author

pgstef commented Mar 29, 2021

Issue still occurring. Please have a look at it ?

@jekyllbot jekyllbot removed the stale label Mar 29, 2021
@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@meribold
Copy link

meribold commented Jun 8, 2021

Drafts used to be excluded from the generated feed. It seems #316 changed this. I just updated jekyll-feed and was surprised to see my drafts pop up in my feed reader.

@jekyllbot jekyllbot removed the stale label Jun 8, 2021
@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@meribold
Copy link

meribold commented Oct 8, 2021

This is still relevant. I think the options are reverting #316 or adding some kind of configuration flag that restores the old behavior.

@jekyllbot jekyllbot removed the stale label Oct 8, 2021
@ashmaroli
Copy link
Member

@parkr What do you think would be the best path forward considering the fact that this is a whitelisted plugin on GitHub Pages?

@parkr
Copy link
Member

parkr commented Oct 9, 2021

I'd add a show_drafts config under feed to filter them. The global show_drafts field is really meant for non-production environments, like local or a Netlify Preview deploy.

@parkr parkr reopened this Oct 9, 2021
@jekyllbot jekyllbot added the stale label Dec 9, 2021
@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@meribold
Copy link

meribold commented Dec 9, 2021

The resources of the Jekyll team are limited, and so we are asking for your help.

I don't expect anyone to volunteer their time working on this issue, but @jekyllbot doesn't seem helpful. Why not just leave issues open even if there isn't much activity? Here's a pretty good case against using bots that automatically close issues: https://drewdevault.com/2021/10/26/stalebot.html.

@jekyllbot jekyllbot removed the stale label Dec 9, 2021
@jekyllbot jekyllbot added the stale label Feb 9, 2022
@jekyll jekyll deleted a comment from jekyllbot Feb 9, 2022
@parkr
Copy link
Member

parkr commented Feb 9, 2022

Sorry about jekyllbot. The motivation there is to cut down on noise for the maintainers by ensuring that the open issues are ones that are still occurring and still important to the user. On a big project like Jekyll you get a lot of drive-by issues for folks that never follow up. Many folks use the Jekyll issues for support too but we prefer folks to use talk.jekyllrb.com for help with installing etc. Anyway, I pinned this issue so Jekyllbot should stop following up.

My solution here would be to add a flag to config.yml. Since we're pre-1.0, stability is not guaranteed per semver. I think the right behavior is: if show_drafts is true, then show everywhere (including the feed) unless explicitly turned off for the feed.

show_drafts: true
# no feed config, show in feed
show_drafts: true
feed:
  include_drafts: false
# don't show in feed

Adding a flag makes things just a little more complicated but the use cases are valid for both scenarios.

By the way, Netlify and Heroku would gladly deploy a draft site from a pull request that you can share to others. This isolates the changes you want reviewed from your "production" environment and might be the best option moving forward for sharing drafts with others and previewing on mobile.

@meribold
Copy link

I pinned this issue so Jekyllbot should stop following up.

Thanks!

By the way, Netlify and Heroku would gladly deploy a draft site from a pull request that you can share to others. This […] might be the best option moving forward for sharing drafts with others and previewing on mobile.

You're right and I have actually set up something similar for my website in the meantime. I.e., (speaking only for myself) I don't really need the ability to exclude drafts from feeds anymore. Back in 2016 there were quite a few people in issue #94 and PR #95 that wanted drafts to be excluded from feeds, but this issue barely has drawn any interest since it's been opened about a year ago. Perhaps it's become much more common to only push drafts to a testing environment since then. OTOH, having an include_drafts: false option might still be useful for GitHub Pages users.

@pgstef
Copy link
Author

pgstef commented Mar 21, 2022

OTOH, having an include_drafts: false option might still be useful for GitHub Pages users.

Very useful :-) I'm indeed using GH Pages (because it is very easy to use for my simple/basic use-case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants