-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategories.html
More file actions
39 lines (37 loc) · 1.44 KB
/
categories.html
File metadata and controls
39 lines (37 loc) · 1.44 KB
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
30
31
32
33
34
35
36
37
38
39
---
layout: default
title: 카테고리
description: "실전코딩 기술 블로그의 개발, AI, 서버, 데이터베이스 등 카테고리별 포스트 모음"
lang: ko
permalink: /categories/
---
{% assign current_lang = "ko" %}
<div class="container categories-container">
<div class="categories-overview">
{% assign sorted_categories = site.categories | sort %}
{% for category in sorted_categories %}
{% assign cat_posts = category[1] | where: "lang", current_lang %}
{% if cat_posts.size > 0 %}
<a href="#{{ category[0] | slugify }}" class="category-chip">
{{ category[0] }} <span class="count">{{ cat_posts.size }}</span>
</a>
{% endif %}
{% endfor %}
</div>
{% for category in sorted_categories %}
{% assign cat_posts = category[1] | where: "lang", current_lang %}
{% if cat_posts.size > 0 %}
<div class="category-section" id="{{ category[0] | slugify }}">
<h2>{{ category[0] }} <span class="category-count-badge">{{ cat_posts.size }}</span></h2>
<ul class="category-posts">
{% for post in cat_posts %}
<li class="category-post-item">
<span class="category-post-date">{{ post.date | date: "%Y.%m.%d" }}</span>
<span class="category-post-title"><a href="{{ post.url | relative_url }}">{{ post.title }}</a></span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
</div>