Skip to content

Commit

Permalink
Create partial template for home page blog section
Browse files Browse the repository at this point in the history
  • Loading branch information
helenclx committed Dec 4, 2024
1 parent 1e5a427 commit 4bb7fcd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/_includes/main/blog-section.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<section class="section--home grid-center">
<h2 class="heading--home">Latest Blog Posts</h2>
{% set postList = collections.posts | reverse | itemLimit(3) %}
{% include "blog/postslist.njk" %}
<a class="home__btn-link" href="/blog">More Blog Posts</a>
</section>
9 changes: 2 additions & 7 deletions src/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ metadata:
<div class="home--container">
{% include "main/profile.njk" %}
{# {% include "main/upcoming.njk" %} #}
<section class="section--home grid-center">
<h2 class="heading--home">Latest Blog Posts</h2>
{% set postList = collections.posts | reverse | itemLimit(3) %}
{% include "blog/postslist.njk" %}
<a class="home__btn-link" href="/blog">More Blog Posts</a>
</section>
{% include "main/blog-section.njk" %}
{% include "main/project-grid.njk" %}
{% include "main/webmembership.njk" %}
{% include "main/web-membership.njk" %}
{% include "main/badges.njk" %}
</div>

0 comments on commit 4bb7fcd

Please sign in to comment.