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 50
50
{% unless site.show_drafts %}
51
51
{% assign posts = posts | where_exp: "post", "post.draft != true" %}
52
52
{% endunless %}
53
+ {% assign posts = posts | where_exp: "post", "post.hidden == nil or post.hidden == false" %}
53
54
{% assign posts = posts | sort: "date" | reverse %}
54
55
{% assign posts_limit = site.feed.posts_limit | default: 10 %}
55
56
{% 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 50
50
expect ( contents ) . to match "http://example.org/news/2013/12/12/dec-the-second.html"
51
51
expect ( contents ) . to match "http://example.org/2015/08/08/stuck-in-the-middle.html"
52
52
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"
53
54
end
54
55
55
56
it "does not include assets or any static files that aren't .html" do
@@ -411,6 +412,7 @@ def to_s
411
412
expect ( contents ) . to match "http://example.org/news/2013/12/12/dec-the-second.html"
412
413
expect ( contents ) . to match "http://example.org/2015/08/08/stuck-in-the-middle.html"
413
414
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"
414
416
end
415
417
416
418
it "outputs the category feeds" do
@@ -443,6 +445,7 @@ def to_s
443
445
expect ( contents ) . to match "http://example.org/news/2013/12/12/dec-the-second.html"
444
446
expect ( contents ) . to match "http://example.org/2015/08/08/stuck-in-the-middle.html"
445
447
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"
446
449
end
447
450
448
451
it "outputs the category feed" do
You can’t perform that action at this time.
0 commit comments