{% comment %} # ----------------------------------------------------------------------------- # ~/_includes/themes/j1/procedures/posts/collate_calendar.proc # Liquid PROCEDURE to collate posts ordered like a calendar # # 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_calendar' procedure # # Example: # # {% assign posts_collate = site.posts %} # {% include themes/{{site.template.name}}/procedures/posts/collate_calendar.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 %} Variables ----------------------------------------------------------------------------- {% endcomment %} {% assign posts_collate = include.items %} {% assign header_title = false %} {% assign header_tagline = false %} {% comment %} Liquid procedures ----------------------------------------------------------------------------- {% endcomment %} {% 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/posts/custom/collate_calendar %} {% else %} {% if header_title %}

{{header_title}}

{% if header_tagline %}

{{header_tagline}}

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