{% comment %} # ----------------------------------------------------------------------------- # ~/_includes/themes/j1/procedures/posts/collate_timeline.proc # Liquid PROCEDURE to collate posts along a timeline # # http://jekyll.one # # Copyright (C) 2019 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE # # ----------------------------------------------------------------------------- # NOTE: # # Collate posts procedure. Collated posts ordered along a timeline. # # Usage: # # 1) assign the 'posts_collate' variable to a valid array of posts # 2) include the 'collate_timeline' procedure # # Example: # # {% assign posts_collate = site.posts %} # {% include themes/{{site.template.name}}/procedures/posts/collate_timeline.proc items=posts_collate %} # # Ordering: # # Posts are displayed in reverse chronological order (descending). # For ascending chronological order: # Change the for loop to this: # => 'for post in posts_collate reversed' # # ----------------------------------------------------------------------------- # Test data: # liquid_var: {{ liquid_var | debug }} # # ----------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% assign builder_config = site.data.builder.blog_navigator.collate_timeline %} {% assign header_title = false %} {% assign header_tagline = false %} {% assign posts_collate = include.items %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% if include.header_title %} {% assign header_title = include.header_title %} {% endif %} {% if include.header_tagline %}{% assign header_tagline = include.header_tagline %}{% endif %} {% if site.data.j1_config.posts_collate.provider == 'custom' %} {% include themes/{{site.template.name}}/procedures/custom/posts_collate %} {% else %} {% if header_title %}

{{header_title}}

{% if header_tagline %}

{{header_tagline}}

{% endif %}
{% endif %} {% endif %} {% assign posts_collate = nil %}