Sha256: f4e00ddad74369317b504b8282078b406d9253780ec9e2ffc137e8ddc073935b

Contents?: true

Size: 961 Bytes

Versions: 10

Compression:

Stored size: 961 Bytes

Contents

{% assign post = include.post %}

{% if page.related_posts %}
  {% assign related_posts = site.posts | where_exp:"post", "page.related_posts contains post.path" %}
{% elsif 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

10 entries across 10 versions & 2 rubygems

Version Path
jekyll-theme-hydebetty-1.0.2 _includes/components/related-posts.html
jekyll-theme-hydebetty-1.0.1 _includes/components/related-posts.html
jekyll-theme-hydejack-8.5.2 _includes/components/related-posts.html
jekyll-theme-hydejack-8.5.1 _includes/components/related-posts.html
jekyll-theme-hydejack-8.5.0 _includes/components/related-posts.html
jekyll-theme-hydejack-8.4.0 _includes/components/related-posts.html
jekyll-theme-hydejack-8.3.2 _includes/components/related-posts.html
jekyll-theme-hydejack-8.3.1 _includes/components/related-posts.html
jekyll-theme-hydejack-8.3.0 _includes/components/related-posts.html
jekyll-theme-hydejack-8.2.0 _includes/components/related-posts.html