Skip to content

Commit d3451fe

Browse files
committed
Fix Liquid templating error: add null check for site.staging collection
1 parent e6f8f56 commit d3451fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

staging/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ This is where posts are staged for preview before going live.
1616
## Staged Posts
1717

1818
<div class="post-links">
19-
{% assign staging_posts = site.staging | sort: 'date' | reverse %}
20-
{% if staging_posts.size > 0 %}
19+
{% if site.staging and site.staging.size > 0 %}
20+
{% assign staging_posts = site.staging | sort: 'date' | reverse %}
2121
{% for post in staging_posts %}
2222
<div class="post-link-wrapper">
2323
<a href="{{ post.url | relative_url }}" class="post-link">{{ post.title }}</a>

0 commit comments

Comments
 (0)