pattex / jekyll-tagging

Jekyll plugin to automatically generate a tag cloud and tag pages.
385 stars 76 forks source link

Post on Development Mode are different from Production Mode #74

Open albertoivo opened 5 years ago

albertoivo commented 5 years ago

Hello,

When I run my blog on Development Mode, the related posts are as expected. Only the posts with the same tags are shown.

But when I push it to Production Mode, it doesn't work. The Related Posts section show the last posts instead of the related posts.

I installed the jekyll-tagging-related-posts with gem.

My _config.yml:

plugins:
  - jekyll/tagging
  - jekyll-tagging-related_posts

And my HTML:

  {% if site.related_posts.size >= 1 %}
  <div>
    <h3>Related Posts</h3>
    <ul>
      {% for related_post in site.related_posts limit: 5 %}
      <li><a href="{{ related_post.url }}">{{ related_post.title }}</a></li>
      {% endfor %}
    </ul>
  </div>
  {% endif %}

And My Post Header:

---
layout: post
title: My Post Title
category: Category A
tags: [aaa, bbb, ccc]
---

What am I missing here? Can anybody help me, please?