diff --git a/_includes/essays/essays.html b/_includes/essays/essays.html index 641eb5a..99f8195 100644 --- a/_includes/essays/essays.html +++ b/_includes/essays/essays.html @@ -18,8 +18,15 @@

Essays

{% endfor %} - {% if essay_pages.size > include.limit %} -

See all {{ essay_pages.size }} essays

+ {% assign not_draft = 0 %} + {% for page in essay_pages %} + {% unless page.draft %} + {% assign not_draft = not_draft | plus: 1 %} + {% endunless %} + {% endfor %} + + {% if not_draft > include.limit %} +

See all {{ not_draft }} essays

{% endif %} diff --git a/_includes/projects/projects.html b/_includes/projects/projects.html index 48a9041..249708d 100644 --- a/_includes/projects/projects.html +++ b/_includes/projects/projects.html @@ -18,8 +18,15 @@

Projects

{% endfor %} - {% if project_pages.size > include.limit %} -

See all {{ project_pages.size }} projects

+ {% assign not_draft = 0 %} + {% for page in project_pages %} + {% unless page.draft %} + {% assign not_draft = not_draft | plus: 1 %} + {% endunless %} + {% endfor %} + + {% if not_draft > include.limit %} +

See all {{ not_draft }} projects

{% endif %}