Skip to content

Commit

Permalink
Fix featured posts and add featured image flag (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhcoll authored Oct 25, 2023
1 parent 4d8a8c4 commit 310e4f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions _includes/featured_posts.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if include.categoryName == "Latest Articles" %}
{% assign featuredPosts = site.tags.featured %}
{% else %}
{% assign featuredPosts = site.emptyArray %}
{% assign featuredPosts = '' | split: '' %}
{% for post in include.postsToFilter %}
{% if post.tags contains 'featured' %}
{% assign featuredPosts = featuredPosts | push: post %}
Expand Down Expand Up @@ -51,7 +51,7 @@ <h3 class="cell">
<polygon points="0 0 650 0 650 109.736 353 410 0 410"/>
</svg>
{% endcase %}
{% if post.image %}
{% if post.image and post.featuredImage %}
<img class="cell show-for-large" src="{{ site.baseurl }}/{{post.image}}"/>
{% endif %}
</div>
Expand Down
5 changes: 2 additions & 3 deletions _layouts/default_post.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ <h1 class="title">{{ page.title }}</h1>
<div class="cell post-content">
{{ content }}
</div>

{% include read_more.html author=author authorUsername=authorUsername page=page %}


{% if site.data.related contains post.url %}
{% include read_more.html author=author authorUsername=authorUsername page=page %}
{% assign related = site.data.related[post.url] %}
{% assign posts = site.posts | where_exp:"item", "item.url == related[0]" %}
{% include post_summary_list.html posts=posts hideCategory=true %}
Expand Down

0 comments on commit 310e4f9

Please sign in to comment.