layout: default


<!– Start of generated category page –> <article class=“page”> {%- assign category = 'Category' -%} {%- if site.data.text-for.tCategory -%}{%- assign category = site.data.text-for.tCategory -%}{%- endif %}

<header class="page-header">
        <h1 class="page-title">{{ category }}: {{ page.title | capitalize }}</h1>
</header>

{%- assign found = false -%} {%- for post in site.posts -%}

{%- if post.categories -%}
        {%- for cat in post.categories -%}
                {%- if cat == page.title -%}
                        {%- assign found = true %}
                                <div class="category-post">
                                        <h2 class="cp-header">
                                                <span class="cph-title">{{ post.title }}</span>
                                                <span class="post-meta">{{ post.date | date: "%F" }}</span>
                                        </h2>
                        {%- if post.tags.size > 0 -%}
                                {%- assign tags = 'Tags' -%}
                                {%- if site.data.text-for.tTags -%}
                                        {%- assign tags = site.data.text-for.tTags -%}
                                {%- endif %}
                                        <p class="post-tags">{{ tags }}: <span>
                                {%- for tag in post.tags -%}
                                        {{ tag }}{%- if tag != post.tags.last -%}, {%- endif -%}
                                {%- endfor -%}</span>
                                        </p>
                        {%- endif -%}
                        {%- assign more = 'more' -%}
                        {%- if site.data.text-for.tMore -%}
                                {%- assign more = site.data.text-for.tMore -%}
                        {%- endif %}
                                        <p>{{ post.excerpt | remove: '<p>' | remove: '</p>' }}<a href="{{ post.url }}">{{ more }}...</a></p>
                                </div>
                {%- endif -%}
        {%- endfor -%}
{%- endif -%}

{%- endfor -%} {%- if found == false -%}

{%- assign message = 'No blogposts found for this category' -%}
{%- if site.data.text-for.tNoBlogpostFound -%}
        {%- assign message = site.data.text-for.tNoBlogpostFound -%}
{%- endif %}
        <div><p style="text-align: center;">{{ message }}</p></div>

{%- endif %} </article> <!– End of generated category page –>