<!– include categories.html –> {%- if jekyll.environment != 'production' and site.data.setup.fast-content-build -%}{%- else %}

    {%- assign buildTimeInSecondsSinceEpoch = site.time | date: "%s" | plus: 0 -%}

    {%- assign pagesForPublishing = "" | split: "" -%}
    {%- for ape in site.pages -%}
            {%- assign pageInSecondsSindsEpoch = ape.date | date:"%s" | plus: 0 -%}
            {%- if pageInSecondsSindsEpoch < buildTimeInSecondsSinceEpoch -%}
                {%- assign pagesForPublishing = pagesForPublishing | push: ape -%}
            {%- endif -%}
{%- endfor -%}

<div class=“categories”>

{%- assign categories = 'Categories' -%}
{%- if site.data.text-for.tCategories -%}{%- assign categories = site.data.text-for.tCategories -%}{%- endif %}
<input type="checkbox" id={{ "category-checkbox" | append: include.label-modifier }}>
<label for={{ "category-checkbox" | append: include.label-modifier }}><h1>{{ categories }}</h1></label>
{%- assign cats = pagesForPublishing | where:'layout', 'category-page' | sort:'title' -%}
{%- if cats.size > 0 -%}
        {%- for cat in cats %}
<div class="text"><a href="{{ cat.url | relative_url }}"><p>{{ cat.title | capitalize }}</p></a></div>
        {%- endfor -%}
{%- else -%}
        {%- assign no-categories = 'None' -%}
        {%- if site.data.text-for.tNoCategories -%}{%- assign no-categories = site.data.text-for.tNoCategories -%}{%- endif %}
<div class="text"><p>{{ no-categories | capitalize }}</p></div>
{%- endif %}

</div> {%- endif %} <!– end of include categories.html –>