{% comment %} # ----------------------------------------------------------------------------- # ~/_includes/themes/j1/layouts/content_generator_blog_archive.html # Liquid template to create the content portion for pages of type BLOG/ARCHIVE # # Product/Info: # https://jekyll.one # # Copyright (C) 2020 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE # ----------------------------------------------------------------------------- # Test data: # liquid_var: {{ liquid_var | debug }} # page_path: {{ page_path | debug }} # page_url: {{ page.url | remove_first:'page2/index.html' | debug }} # navigator_path: {{ navigator_path | debug }} # ----------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% capture get_page_path %}themes/{{site.template.name}}/procedures/global/get_page_path.proc{% endcapture %} {% capture collate_list %}themes/{{site.template.name}}/procedures/posts/collate_list.proc{% endcapture %} {% capture collate_timeline %}themes/{{site.template.name}}/procedures/posts/collate_timeline.proc{% endcapture %} {% capture create_navigator %}themes/{{site.template.name}}/procedures/posts/create_navigator.proc{% endcapture %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% assign view_config_article_navigator = site.data.builder.blog_navigator.article_navigator %} {% assign article_navigator_description = view_config_article_navigator.description %} {% assign view_config_article_previewer = site.data.builder.blog_navigator.article_previewer %} {% assign article_previewer_description = view_config_article_previewer.description %} {% comment %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign plugins = site.data.plugins %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign paginator_defaults = plugins.defaults.paginator.settings %} {% assign paginator_settings = plugins.paginator.settings %} {% comment %} Set config options -------------------------------------------------------------------------------- {% endcomment %} {% assign paginator_options = paginator_defaults | merge: paginator_settings %} {% assign previewer = site.data.builder.blog_navigator.previewer %} {% assign paginate = paginator_options.pagination.enabled %} {% assign rtext = site.data.template_settings.typography.rtext %} {% assign page_rtext = page.rtext %} {% assign page_rtext_size = page.rtext_size %} {% comment %} rtext|size detection -------------------------------------------------------------------------------- {% endcomment %} {% if rtext %} {% assign rtext_size = site.data.template_settings.typography.rtext_size %} {% else %} {% assign rtext_size = 0 %} {% endif %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %}
{% comment %} Blog Navigator ------------------------------------------------------------------------ {% endcomment %}
{% include {{get_page_path}} mode='absolute' %} {% capture navigator_path%}{{page_path}}{% endcapture %} {% capture archive_path %}{{navigator_path}}/archive{% endcapture %} {% capture date_view %}{{archive_path}}/dateview/{% endcapture %} {% capture category_view %}{{archive_path}}/categoryview/{% endcapture %} {% capture tag_view %}{{archive_path}}/tagview/{% endcapture %} {% capture all_view %}{{archive_path}}/{% endcapture %} {% comment %} https://stackoverflow.com/questions/22763180/assign-an-array-literal-to-a-variable-in-liquid-template {% endcomment %} {% assign my_array = "one|two|three" | split: "|" %}
{% comment %} End Blog Navigator -------------------------------------------------------------------- {% endcomment %} {% comment %} Article Previewer -------------------------------------------------------------------- {% endcomment %} {% if paginate %}

Preview

{% comment %} Display pagination links if any ---------------------------------------------------------------- {% endcomment %} {% if paginator.total_pages > 1 %} {% endif %}
{{article_previewer_description}}
{% assign posts_collate = paginator.posts %} {% case previewer %} {% when 'list' %} {% include {{collate_list}} header_title=page.header_title header_tagline=page.header_tagline items=posts_collate %} {% when 'calendar' %} {% include {{collate_calendar}} header_title=page.header_title header_tagline=page.header_tagline items=posts_collate %} {% when 'timeline' %} {% include {{collate_timeline}} items=posts_collate limit_excerpt=50 %} {% else %} {% include {{collate_list}} header_title=page.header_title header_tagline=page.header_tagline items=posts_collate %} {% endcase %}
{% endif %} {% comment %} End Article Previewer -------------------------------------------------------------------- {% endcomment %}
{% comment %} Place Sidebar|Tocbot -------------------------------------------------------------------------- {% endcomment %} {% comment %} tocbot and page_navigation (not used anymore) -------------------------------------------------------------------------- -------------------------------------------------------------------------- {% endcomment %} {% comment %} Calc|Write the Back URL -------------------------------------------------------------------------- {% endcomment %} {% if site.permalink == 'none' %} {% capture browser_page_url %}{{page.url}}.html {% endcapture %} {% else %} {% capture browser_page_url %}{{page.url}}{% endcapture %} {% endif %}