Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development mode different from Production Mode #8

Open
albertoivo opened this issue Jul 25, 2019 · 0 comments
Open

Development mode different from Production Mode #8

albertoivo opened this issue Jul 25, 2019 · 0 comments

Comments

@albertoivo
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant