How can I list blog posts without a 'blog.articles' pagination error?

Hi I’m trying to make a page that lists my blog posts. Here is the page and the template with error below:

Any idea how to complete this having it actually display the articles and without the liquid error?

error(template):

liquid error (sections/blog-template line 7): array ‘blog.articles’ is not paginateable.

page:

<div class="page-tpl">
  <div class="container">
    {% include 'breadcrumb' %}

    <header class="page-header">
      <h2>
        {% include 'multilang' with page.title %}
      </h2>      
    </header>

    {% if settings.blog_layout == "default" %} 
      {% include 'blog-default' %}
    {% elsif settings.blog_layout == "full_width" %}
      {% include 'blog-full-width' %}
    {% elsif settings.blog_layout == "mansory" %}
      {% include 'blog-mansory' %}
    {% elsif settings.blog_layout == "right_sidebar" %}
      {% include 'blog-right-sidebar' %}
    {% endif %}

    {% assign content_parts = page.content | split: '[lang2]' %}
    {% if settings.enable_multilang and page.content contains '[lang2]' %}
      <div class="rte lang1">
        {{ content_parts | first }}
      </div>
      <div class="rte lang2">
        {{ content_parts | last }}
      </div>
    {% else %}
      <div class="rte">
        {{ content_parts | first }}
      </div>
    {% endif %}
  </div>
</div>

Template:

liquid error (sections/blog-template line 7): array ‘blog.articles’ is not paginateable.

{% if section.settings.blog_post != blank %}
  {% assign limit = section.settings.blog_post %}
{% else %}
  {% assign limit = 3 %}
{% endif %}

 {% paginate blog.articles by limit %}

<div class="content-blog blog-default">
  <ul class="list-blog">    
    {% for article in blog.articles %}
    {% include 'blog-item' %}
    {% endfor %}
  </ul>

  {% if paginate.pages > 1 %}
  {% include 'pagination' %}
  {% endif %}
</div>
{% endpaginate %}

<style>
  .halo-blog-content .article-details .article-excerpt {
    text-align: {{ section.settings.blog_text_align }};
  }
</style>

{% schema %}
  {
    "name": "Blog Default",
	"class": "col-12 col-xl-9 col-main",
    "settings": [      
      {
        "type": "text",
        "id": "blog_post",
        "label": "Blog post per page",
        "default": "3"
      },
      {
        "type": "select",
        "id": "blog_text_align",
        "label": "Blog Text Align",
        "options": [
          {
            "value": "center",
            "label": "Center"
          },
          {
            "value": "left",
            "label": "Left"
          },
          {
            "value": "right",
            "label": "Right"
          }
        ],
        "default": "left",
        "info": "Default Value: Left"
      },
      {
        "type": "checkbox",
        "id": "blog_show_author",
        "label": "Show author",
        "default": true
      },
      {
        "type": "checkbox",
        "id": "blog_show_date",
        "label": "Show date",
        "default": true
      }
    ]
  }
{% endschema %}
1 Like