File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 5050 {% unless site.show_drafts %}
5151 {% assign posts = posts | where_exp: "post", "post.draft != true" %}
5252 {% endunless %}
53+ {% assign posts = posts | where_exp: "post", "post.hidden == nil or post.hidden == false" %}
5354 {% assign posts = posts | sort: "date" | reverse %}
5455 {% assign posts_limit = site.feed.posts_limit | default: 10 %}
5556 {% for post in posts limit: posts_limit %}
Original file line number Diff line number Diff line change 1+ ---
2+ hidden : 1
3+ ---
4+
5+ # A hidden post
Original file line number Diff line number Diff line change 5050 expect ( contents ) . to match "http://example.org/news/2013/12/12/dec-the-second.html"
5151 expect ( contents ) . to match "http://example.org/2015/08/08/stuck-in-the-middle.html"
5252 expect ( contents ) . to_not match "http://example.org/2016/02/09/a-draft.html"
53+ expect ( contents ) . to_not match "http://example.org/2024/01/31/hidden-sample.html"
5354 end
5455
5556 it "does not include assets or any static files that aren't .html" do
@@ -411,6 +412,7 @@ def to_s
411412 expect ( contents ) . to match "http://example.org/news/2013/12/12/dec-the-second.html"
412413 expect ( contents ) . to match "http://example.org/2015/08/08/stuck-in-the-middle.html"
413414 expect ( contents ) . to_not match "http://example.org/2016/02/09/a-draft.html"
415+ expect ( contents ) . to_not match "http://example.org/2024/01/31/hidden-sample.html"
414416 end
415417
416418 it "outputs the category feeds" do
@@ -443,6 +445,7 @@ def to_s
443445 expect ( contents ) . to match "http://example.org/news/2013/12/12/dec-the-second.html"
444446 expect ( contents ) . to match "http://example.org/2015/08/08/stuck-in-the-middle.html"
445447 expect ( contents ) . to_not match "http://example.org/2016/02/09/a-draft.html"
448+ expect ( contents ) . to_not match "http://example.org/2024/01/31/hidden-sample.html"
446449 end
447450
448451 it "outputs the category feed" do
You can’t perform that action at this time.
0 commit comments