--- layout: page title: Posts by tag tagline: Check out all blog posts by tag #permalink: /pages/private/blog/navigator/archive/tagview/ skip_words: [ posts ] resource_options: - masthead: opacity: 0.5 slides: - url: /assets/images/master_header/chuttersnap-1280x800.png alt: chuttersnap-1200x800 regenerate: false --- {% comment %} TODO: logic for "letter_group_written == false" to be fixed -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Liquid procedures -------------------------------------------------------------------------------- {% endcomment %} {% capture get_page_path %}themes/{{site.template.name}}/procedures/global/get_page_path.proc{% endcapture %} {% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %} {% capture get_category %}themes/{{site.template.name}}/procedures/global/get_category.proc{% endcapture %} {% capture get_category_item %}themes/{{site.template.name}}/procedures/global/get_category_item.proc{% endcapture %} {% capture create_word_cloud %}themes/{{site.template.name}}/procedures/global/create_word_cloud.proc{% endcapture %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% assign view_config = site.data.builder.blog_navigator.tag_view %} {% assign view_description = view_config.description %} {% if site.permalink == 'none' %} {% capture browser_page_url %}{{ page.url }}.html{% endcapture %} {% else %} {% capture browser_page_url %}{{ page.url }}{% endcapture %} {% endif %} {% comment %} jadams: skip_words needs to be configured by yaml data file -------------------------------------------------------------------------------- {% endcomment %} {% assign letter_groups = "ab, cd, ef, gh, ij, kl, mn, op, qr, st, uvw, xyz" %} {% assign letter_groups = letter_groups | remove: ' ' %} {% assign letter_group_array = letter_groups | split:',' %} {% assign letter_group_counter = 0 %} {% assign letter_group_written = false %} {% include {{get_page_path}} mode='absolute' %} {% assign navigator_path = page_path | remove_first:'archive' %} {% capture navigator %}{{navigator_path}}{% endcapture %} {% capture blog_preview %}{{page_path}}/preview/{% endcapture %} {% capture date_view %}{{page_path}}/dateview/{% endcapture %} {% capture category_view %}{{page_path}}/categoryview/{% endcapture %} {% capture tag_view %}{{page_path}}/tagview/{% endcapture %} {% capture all_view %}{{page_path}}/{% endcapture %} {% comment %} TODO: skip_words should configured by yaml data file? -------------------------------------------------------------------------------- {% endcomment %} {% assign tags = site.tags | sort %} {% capture site_tag_word_list %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tags = site_tag_word_list | split:',' %} {% for tag in tags %} {% if page.skip_words contains tag %} {% continue %} {% endif %} {% capture tag_list %}{{ tag_list | append: tag }}{% unless forloop.last %},{% endunless %}{% endcapture %} {% endfor %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% include {{create_word_cloud}} word_list=tag_list source="tags" %}
{{view_description}}

Posts By Tag

{% assign letter_group = letter_group_array[letter_group_counter] %} {% for item in (0..site.tags.size) %}{% unless forloop.last %} {% capture this_word %}{{ word_array[item] | strip_newlines }}{% endcapture %} {% for skip_word in skip_word_array %} {% if skip_word contains this_word %} {% assign skip = true %} {% else %} {% assign skip = false %} {% endif %} {% if skip %} {% break %} {% endif %} {% endfor %} {% if skip %} {% continue %} {% endif %} {% assign first_letter = this_word | slice: 0, 1 %} {% assign first_letter = first_letter | downcase %} {% if letter_group contains first_letter %} {% comment %} jadams, 2018-01-17: logic seems NOT work. Disabled. -------------------------------------------------------------------------- {% if letter_group_written == false %} {% assign letter_group_written = true %} {% endif %} -------------------------------------------------------------------------- {% endcomment %} {% else %} {% assign letter_group_counter = letter_group_counter | plus:1 %} {% assign letter_group = letter_group_array[letter_group_counter] %} {% comment %} jadams, 2018-01-17: logic seems NOT work. Added workaround by checking if letter_group has a value -------------------------------------------------------------------------- {% endcomment %} {% if letter_group %} {% endif %} {% assign letter_group_written = true %} {% endif %} {% comment %} letter_group: {{ letter_group | debug }} this_word: {{ this_word | debug }} first_letter: {{ first_letter | debug }} {% endcomment %} {% for post in site.tags[this_word] %}{% if post.title != null %} {% include {{get_category}} post=post %} {% assign category = _category %} {% include {{get_category_item}} category=category %} {% include {{select_icon_size}} family=icon_family size=icon_size %} {% assign icon_size = size %} {% assign excerpt = post.excerpt | truncatewords: 50 | strip_html | strip_newlines | strip %}
{{ post.title }}
{{ post.tagline }}

{{ excerpt }}

{% endif %}{% endfor %} {% endunless %}{% endfor %}