1
votes

I am trying to change the way that posts are displayed on my home page, but no matter what I do, changes don't appear to get reflected at all. Here are the steps that I followed:

_config.yml

JB :
  version : 0.2.13
  posts_collate : 
     provider : "custom"

Then I created the file _includes/custom/posts_collate with the exact same content as _includes/JB/posts_collate but with a few tweaks.

My original posts_collate starts off like this:

  {% if site.JB.posts_collate.provider == "custom" %}
  {% include custom/posts_collate %}
  {% else %}
    {% for post in posts_collate  %}
       {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
       {% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %}
       {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
       {% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}

Am I editing the right file? What could be the cause for my changes not getting reflected in the custom folder?

1
Does the posts_collate file perhaps have an extension?Rudy Velthuis

1 Answers

0
votes

In case you haven't fixed it yet, here's the info that works below that I tested. You set up your _config.yml correctly.

Two other things you need to do.

  1. Update the include path to be 'JB/custom/posts_collate' as it is referencing the path from _includes/
  2. Stop and restart the server with $ jekyll --server so it can parse your updated _config.yml file as well