-
Notifications
You must be signed in to change notification settings - Fork 1
/
blog.html
executable file
·41 lines (36 loc) · 1.07 KB
/
blog.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
37
38
39
40
41
---
layout: blog
title: Blog
order: 4
---
<h2 id="categories"><a href="#example" class="toggle">Categories</a></h2>
<span class="small_desc">Click here to see all categories</span>
<div class="clearfix"></div>
<div class="toggle-content" id="example">
{% for category in site.categories %}
{% capture category_name %}{{ category | first }}{% endcapture %}
<h3 class="category_name_link"><a href="{{site.baseurl}}category/{{category_name}}">{{category_name}}</a></h3>
<ul>
{% for post in site.categories[category_name] %}
<li><a href="{{ post.url }}">{{post.title}}</a><span>{{post.date | date_to_string}}</span></li>
{% endfor %}
</ul>
{% endfor %}
</div>
<hr>
<div class="posts">
{% for post in site.posts %}
<div class="post">
<h1 class="post-title">
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h1>
<span class="post-date">{{ post.date | date_to_string }}</span>
<p>
{{ post.excerpt | truncatewords: 50 }}
</p>
</div>
{% endfor %}
</div>
<script src="/assets/scripts/toggle.js"></script>