-
Notifications
You must be signed in to change notification settings - Fork 0
/
020_tags.html
36 lines (34 loc) · 900 Bytes
/
020_tags.html
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
---
layout: page
title: タグ一覧
permalink: /tags/
toc: false
---
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
{%- assign sorted_tags = site.tags | sort %}
{% for tag in sorted_tags %}
<h3 id="{{ tag[0] }}" class="tag-title">{{ tag[0] }}</h3>
<ul>
{% for post in tag[1] %}
<li>
{{ post.date | date: date_format }}: <a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
<script>
// Add class `active` to current tag title
(function() {
try {
if (window.location.hash && window.location.hash.length > 1) {
const hash = decodeURIComponent(window.location.hash.replace(/^#/, ''));
const dom = document.getElementById(hash);
if (dom != null) {
dom.className += " active";
}
}
} catch (e) {
console.error(e);
}
})();
</script>