forked from alexprivalov/alexprivalov.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategories.html
More file actions
29 lines (25 loc) · 957 Bytes
/
categories.html
File metadata and controls
29 lines (25 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
title: Категории
permalink: "/categories.html"
layout: page
---
{% capture site_categories %}{% for category in site.categories %}{{ category | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign categories_words = site_categories | split:',' | sort %}
<ul class="cat-box inline">
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ categories_words[item] | strip_newlines }}{% endcapture %}
<li><a href="/categories#{{ this_word | cgi_escape }}">{{ this_word }} <span>{{ site.categories[this_word].size }}</span></a></li>
{% endunless %}{% endfor %}
</ul>
{% for postscat in site.categories %}
{% assign cat = postscat | first %}
<h4 id="{{ cat | slugify }}"> - {{ cat }}</h4>
<ul>
{% for post in site.categories.[cat] %}
<li>
{{post.date | date: "%d-%m-%Y"}}
<a href="{{post.url}}">{{post.title}}</a>
</li>
{% endfor %}
</ul>
{% endfor %}