Skip to content

Commit

Permalink
Add other posts page
Browse files Browse the repository at this point in the history
  • Loading branch information
vakho10 committed Jan 28, 2025
1 parent 9858c62 commit 1e0e75a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1 class="m-0 text-center">Other Posts</h1>
</div>
<div class="container">
{% for post in site.posts %}
{% unless post.categories contains "points" %}
{% unless post.categories contains "points" limit:5 %}
<div class="row">
<div class="col">
<div class="card">
Expand All @@ -56,4 +56,9 @@ <h6 class="card-title">
</div>
{% endunless %}
{% endfor %}
<div class="row mt-3">
<div class="col d-flex justify-content-center">
<a href="{{ '/posts' | relative_url }}" class="btn btn-primary">See All Posts &raquo;</a>
</div>
</div>
</div>
32 changes: 32 additions & 0 deletions posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
layout: page
title: "Other Posts"
---
<div class="container">
{% for post in site.posts %}
{% unless post.categories contains "points"%}
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<h3 class="card-title">{{ post.title }}</h3>
<h6 class="card-title">{{ post.date | date: "%B %d, %Y" }}</h6>
<h6 class="card-title">
Categories:
<div class="d-inline-flex gap-1">
{% for category in post.categories %}
<span class="badge text-bg-secondary">{{ category }}</span>
{% endfor %}
</div>
</h6>
<div class="card-text">{{ post.excerpt }}</div>
<a href="{{ post.url | relative_url }}" class="card-link">
Read more &raquo;
</a>
</div>
</div>
</div>
</div>
{% endunless %}
{% endfor %}
</div>

0 comments on commit 1e0e75a

Please sign in to comment.