feat: hide future posts in blog page
This commit is contained in:
@@ -8,6 +8,7 @@ eleventyExcludeFromCollections: true
|
|||||||
|
|
||||||
<div class="space-y-8">
|
<div class="space-y-8">
|
||||||
{%- for post in collections.general | reverse -%}
|
{%- for post in collections.general | reverse -%}
|
||||||
|
{%- if post.date <= page.date -%}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h2 class="text-2xl font-bold mb-1">
|
<h2 class="text-2xl font-bold mb-1">
|
||||||
<a href="{{ post.url }}" class="text-blue-400 hover:underline">{{ post.data.title }}</a>
|
<a href="{{ post.url }}" class="text-blue-400 hover:underline">{{ post.data.title }}</a>
|
||||||
@@ -23,6 +24,7 @@ eleventyExcludeFromCollections: true
|
|||||||
<p class="text-gray-300">{{ post.data.excerpt }}</p>
|
<p class="text-gray-300">{{ post.data.excerpt }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</div>
|
</div>
|
||||||
<script src="/js/view-counter.js"></script>
|
<script src="/js/view-counter.js"></script>
|
||||||
|
Reference in New Issue
Block a user