--- layout: page title: Starter Blog tagline: posts by category date: 2023-01-01 01:00:00 +100 description: Browse articles by category categories: [ Blog ] tags: [ Navigator, Categories ] sort: date toc: true fab_menu_id: open_toc pagination: enabled: false permalink: /page:num/ analytics: true comments: false exclude_from_search: true regenerate: true # needed to update pages resources: [ animate ] resource_options: - attic: padding_top: 400 padding_bottom: 50 opacity: 0.5 slides: - url: /assets/images/modules/attics/matthaeus-1920x1280.jpg alt: Photo by Matthaeus alignY: top badge: type: unsplash author: Matthaeus href: https://unsplash.com/@matthaeus123 --- {% 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_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 %} 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 %} {% comment %} Set config options -------------------------------------------------------------------------------- {% endcomment %} {% assign blog_navigator_options = blog_navigator_defaults | merge: blog_navigator_settings %} {% comment %} Variables -------------------------------------------------------------------------------- {% endcomment %} {% assign truncate_words = site.excerpt_truncate_words %} {% assign category_blacklist = template_config.posts.category_blacklist %} {% if site.permalink == 'none' %} {% capture browser_page_url %}{{page.url}}.html{% endcapture %} {% else %} {% capture browser_page_url %}{{page.url}}{% endcapture %} {% endif %} {% include {{get_page_path}} mode='absolute' %} {% assign navigator_path = page_path|remove_first:'archive' %} {% capture navigator %}{{navigator_path}}{% 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 %} {% if page.sort == 'title' %} {% assign sorted_posts = site.posts|sort: 'title' %} {% elsif page.sort == 'date' %} {% assign sorted_posts = site.posts|sort: 'date' %} {% else %} {% assign sorted_posts = site.posts|sort: 'date' %} {% endif %} {% comment %} TODO: skip_words NOT longer needed? Already done by processing of categories -------------------------------------------------------------------------------- {% capture skip_words %} Posts Public {% endcapture %} -------------------------------------------------------------------------------- {% endcomment %} {% comment %} category processing -------------------------------------------------------------------------------- {% endcomment %} {% for category in category_blacklist %} {% assign capitalized = category|capitalize %} {% capture black_list %}{{black_list|append: capitalized}}{% unless forloop.last %},{% endunless %}{% endcapture %} {% endfor %} {% assign skip_categories = black_list | split: "," | join: " " %} {% capture site_category_word_list %}{% for category in site.categories %}{{category|first|capitalize|lstrip|rstrip}}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign category_words = site_category_word_list|split:',' %} {% assign categories = category_words|uniq %} {% for category in categories %} {% if skip_categories contains category %} {% continue %} {% endif %} {% capture category_list %}{{category_list|append: category}}{% unless forloop.last %},{% endunless %}{% endcapture %} {% endfor %} {% 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 readmore_text = "read" %} {% 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 view_headline = blog_navigator_options.category_view.page_text.en.headline %} {% assign view_description_text = blog_navigator_options.category_view.page_text.en.description %} {% endif %} {% if language == "de" %} {% assign readmore_text = "lesen" %} {% 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 view_headline = blog_navigator_options.category_view.page_text.de.headline %} {% assign view_description_text = blog_navigator_options.category_view.page_text.de.description %} {% endif %} {% comment %} Debugging -------------------------------------------------------------------------------- skip_categories: {{skip_categories | debug}} site_category_word_list: {{site_category_word_list | debug}} -------------------------------------------------------------------------------- {% endcomment %} {% comment %} Main -------------------------------------------------------------------------------- {% endcomment %} {% include {{create_word_cloud}} source="categories" word_list=category_list %}