Comments (15)
I have also published a post “publically” for the purpose of sending it to somebody to proofread.
I’m not sure if future date is the way to do this, seems like that could lead to some trouble if time zones or something caused Jekyll to improperly exclude a new post from the feed.
Perhaps a way to explicitly exclude a post from the feed, similar to sitemap: false
?
from jekyll-feed.
So we could have something like: feed: false
that could be added to the frontmatter of each post and then filtered in the for loop in feed.xml
. Is that what you mean ? It would also be a good solution since I understand your concerns about time zones.
from jekyll-feed.
So we could have something like:
feed: false
that could be added to the frontmatter of each post and then filtered in the for loop infeed.xml
. Is that what you mean ?
👍
from jekyll-feed.
@jeremiemartinez how do you prevent future posts from appearing in your site's human-readable index?
I'm wondering if rather than have the user specify the feature they want ("don't include this in the sitemap", "don't include this in the feed"), the user should expose intend ("this shouldn't be public"), and the two plugins should respond accordingly.
from jekyll-feed.
@benbalter Well, my approach is very similar that the one advised by @pathawks. However, don't judge me, this is not the best code I wrote...
First, I add future: true
to my _config.yml
.
Then, I declare in the frontmatter of my post: public: 1
Finally, in my index.html
, I loop and filter:
{% for post in paginator.posts %}
{% if post.public != 1 %}
[…]
{% endif %}
{% endfor %}
Your idea about a public flag that could be used for every plugin is great but it would require to directly modify jekyll to expose such an API I guess :/
from jekyll-feed.
Jekyll has a Drafts feature already: is there any way in Liquid to detect if a post is a draft?
I can think of multiple reasons why a public page/post should be excluded from a sitemap (even if not excluded from the public view of a site), but the only reason I can think of to exclude a post from the site feed is if it is just a draft snd not yet “public.”
I am just trying to think through this aloud.
from jekyll-feed.
Draft would be a good solution but it seems that Github does not deploy drafts so I cannot ask friends for proofreading unfortunately.
from jekyll-feed.
Sorry I am completely wrong with my last comment. Just need to add show_drafts
flag to my _config.yml
. So knowing if a post is a draft matches our need.
from jekyll-feed.
I wasn’t thinking about GitHub Pages. That makes things a bit trickier, doesn’t it.
from jekyll-feed.
Well, as I corrected in my previous comment, with show_drafts
Github Pages does work.
I looked for a way to know whether a post is a draft or not. We can with something like:
{% if post.draft == false %}
Or
{% unless post.draft %}
What do you think about this solution?
from jekyll-feed.
{% for post in site.posts %}
{% unless post.draft %}
{% endunless %}
{% endfor %}
from jekyll-feed.
Fixed by #95.
from jekyll-feed.
Hey guys, any idea about a release date ? I would love to include this change in my current project!
from jekyll-feed.
@jeremiemartinez v0.5.0 was just released. 😄
from jekyll-feed.
Great news ! Thanks :)
from jekyll-feed.
Related Issues (20)
- exclude posts from feed HOT 12
- doesn't handle tags with spaces or hyphens HOT 13
- Time for a new release HOT 3
- Disable notification 'A new version of content is available.' HOT 6
- Time for a new release HOT 1
- Option to only include unique categories in the feed HOT 6
- Probable issue in feed generation HOT 2
- Option to skip generating feed if no site content changed HOT 3
- Page title incorrect when containing symbols like '>' HOT 9
- Combining multiple collections into the main feed HOT 3
- Time for a new release HOT 1
- Time for a new release HOT 1
- Duplicating feed?
- Feed name missing HOT 6
- Add option to convert all relative URLs in post content to absolute
- Feed icon supported? HOT 1
- Extension .atom in README.md is bad advise; will be served with wrong media type by web servers HOT 1
- Doesn't generate feeds for tags that include spaces HOT 1
- Tag feeds don't include tag name in title
- Append information to post URL (e.g. UTM source)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jekyll-feed.