Sha256: 9d12b3756863ec2dcacf19d534a6eb74bc9c651aac8ea1225b61eb14af279a77

Contents?: true

Size: 829 Bytes

Versions: 3

Compression:

Stored size: 829 Bytes

Contents

{% assign post = include.post %}

{% if site.hydejack.use_lsi or site.use_lsi %}
  {% assign related_posts = site.related_posts %}
{% elsif post.categories.first %}
  {% assign related_posts = site.categories[post.categories.first] | where_exp:"post", "post.url != page.url" %}
{% elsif post.tags.first %}
  {% assign related_posts = site.tags[post.tags.first] | where_exp:"post", "post.url != page.url" %}
{% else %}
  {% assign related_posts = site.related_posts %}
{% endif %}

{% if related_posts.size > 0 %}
<aside class="related mb4" role="complementary">
  <h2 class="hr">{{ site.data.strings.related_posts | default:"Related Posts" }}</h2>

  <ul class="related-posts">
    {% for post in related_posts limit:3 %}
      {% include components/post-list-item.html post=post %}
    {% endfor %}
  </ul>
</aside>
{% endif %}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-theme-hydejack-8.1.1 _includes/components/related-posts.html
jekyll-theme-hydejack-8.1.0 _includes/components/related-posts.html
jekyll-theme-hydejack-8.0.0 _includes/components/related-posts.html