{% 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) 2022 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 %} Set config files -------------------------------------------------------------------------------- {% endcomment %} {% assign template_config = site.data.j1_config %} {% assign blocks = site.data.blocks %} {% assign modules = site.data.modules %} {% assign plugins = site.data.plugins %} {% comment %} Set config data -------------------------------------------------------------------------------- {% endcomment %} {% assign blog_navigator_defaults = modules.defaults.blog_navigator.defaults %} {% assign blog_navigator_settings = modules.blog_navigator.settings %} {% assign paginator_defaults = plugins.defaults.paginator.defaults %} {% assign paginator_settings = plugins.paginator.settings %} {% comment %} Set config options -------------------------------------------------------------------------------- {% endcomment %} {% assign blog_navigator_options = blog_navigator_defaults | merge: blog_navigator_settings %} {% assign paginator_options = paginator_defaults | merge: paginator_settings %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% assign article_navigator = blog_navigator_settings.article_navigator %} {% assign article_previewer = blog_navigator_settings.article_previewer %} {% assign article_navigator_description = blog_navigator_options.article_navigator.description %} {% assign article_previewer_description = blog_navigator_options.article_previewer.description %} {% assign previewer = blog_navigator_options.previewer %} {% assign paginate = paginator_options.pagination.enabled %} {% assign scroller = blog_navigator_options.scroller %} {% assign rtext = template_config.typography.rtext %} {% assign page_rtext = page.rtext %} {% assign page_rtext_size = page.rtext_size %} {% comment %} rtext|size detection -------------------------------------------------------------------------------- {% endcomment %} {% if rtext %} {% assign rtext_size = template_config.typography.rtext_size %} {% else %} {% assign rtext_size = 0 %} {% endif %} {% comment %} language detection -------------------------------------------------------------------------------- {% endcomment %} {% if {{site.language}} == "en" %} {% assign language = "en" %} {% elsif {{site.language}} == "de"%} {% assign language = "de" %} {% else %} {% assign language = "en" %} {% endif %} {% if language == "en" %} {% assign category_view_button_text = blog_navigator_options.button_text.view_selector.category_view.en %} {% assign date_view_button_text = blog_navigator_options.button_text.view_selector.date_view.en %} {% assign archive_view_button_text = blog_navigator_options.button_text.view_selector.archive_view.en %} {% assign tag_view_button_text = blog_navigator_options.button_text.view_selector.tag_view.en %} {% assign paginator_button_older_posts_text = blog_navigator_options.button_text.paginator.older_posts.en %} {% assign paginator_button_newer_posts_text = blog_navigator_options.button_text.paginator.newer_posts.en %} {% assign paginator_button_first_post_text = blog_navigator_options.button_text.paginator.first_post.en %} {% assign paginator_button_last_post_text = blog_navigator_options.button_text.paginator.last_post.en %} {% assign previewer_headline = blog_navigator_options.article_previewer.page_text.en.headline %} {% assign navigator_description_text = blog_navigator_options.article_navigator.page_text.en.description %} {% assign previewer_description_text = blog_navigator_options.article_previewer.page_text.en.description %} {% endif %} {% if language == "de" %} {% assign category_view_button_text = blog_navigator_options.button_text.view_selector.category_view.de" %} {% assign date_view_button_text = blog_navigator_options.button_text.view_selector.date_view.de" %} {% assign archive_view_button_text = blog_navigator_options.button_text.view_selector.archive_view.de" %} {% assign tag_view_button_text = blog_navigator_options.button_text.view_selector.tag_view.de" %} {% assign paginator_button_older_posts_text = blog_navigator_options.button_text.paginator.older_posts.de %} {% assign paginator_button_newer_posts_text = blog_navigator_options.button_text.paginator.newer_posts.de %} {% assign paginator_button_first_post_text = blog_navigator_options.button_text.paginator.first_post.de %} {% assign paginator_button_last_post_text = blog_navigator_options.button_text.paginator.last_post.de %} {% assign previewer_headline = blog_navigator_options.article_previewer.page_text.de.headline %} {% assign navigator_description_text = blog_navigator_options.article_navigator.page_text.de.description %} {% assign previewer_description_text = blog_navigator_options.article_previewer.page_text.de.description %} {% endif %} {% comment %} Main -------------------------------------------------------------------------------- {% 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 {% assign my_array = "one|two|three" | split: "|" %} ------------------------------------------------------------------------ {% endcomment %} {% comment %} Debugging -------------------------------------------------------------------------------- blog_navigator_options.article_navigator.page_text: {{blog_navigator_options.article_navigator.page_text | debug}} -------------------------------------------------------------------------------- {% endcomment %} {% if blog_navigator_options.article_navigator.page_text.enabled %}
{{navigator_description_text}}
{% endif %}
{% if paginate %}

{{previewer_headline}}

{% if scroller == 'jekyll' %} {% if paginator.total_pages > 1 %} {% endif %} {% endif %} {% if scroller == 'jekyll' %} {% if blog_navigator_options.article_previewer.page_text.enabled %}
{{previewer_description_text}}
{% endif %} {% endif %}
{% assign posts_collate = paginator.posts %} {% case previewer %} {% when 'list' %} {% include {{collate_list}} header_alt=page.header_title header_tagline=page.header_tagline items=posts_collate %} {% when 'calendar' %} {% include {{collate_calendar}} header_alt=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_alt=page.header_title header_tagline=page.header_tagline items=posts_collate %} {% endcase %}
{% endif %}
{% 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 %}