-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.html
64 lines (57 loc) · 1.9 KB
/
archive.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
layout: default
---
<link rel="shortcut icon" type="image/x-icon" href="{{ site.baseurl }}/favicon.png" >
Here are <b>all posts, listed by category</b>. Since a post is normally filed under more than one category, it will appear repeated here. I used a lot of categories to make sure this list here could work as a useful index for you to "read up" on what's currently occupying you.
{% comment %}
#
# Change date order by adding '| reversed'
# To sort by title or other variables use {% assign sorted_posts = category[1] | sort: 'title' %}
#
{% endcomment %}
{% assign sorted_cats = site.categories | sort %}
{% for category in sorted_cats %}
{% assign sorted_posts = category[1] | reversed %}
<h4 id="{{category[0] | slugify }}">{{category[0] | capitalize}}</h4>
<ul>
{% for post in sorted_posts %}
<li><a href="{{ site.url }}{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
{% comment %}
<div id="archives">
{% for category in site.categories %}
<div class="archive-group">
<ul>
{% capture category_name %}{{ category | first }}{% endcapture %}
<div id="#{{ category_name | slugize }}"></div>
<li>
<h3 class="category-head">{{ category_name }}</h3>
<a name="{{ category_name | slugize }}"></a>
<ul>
{% for post in site.categories[category_name] %}
<article class="archive-item">
<li><a href="{{ site.baseurl }}{{ post.url }}">{{post.title}}</a></li>
</article>
{% endfor %}
</li>
</ul>
</div>
{% endfor %}
</div>
{% endcomment %}
<p></p>
<p></p>
<p></p>
And finally here are all posts again, this time <b>listed by date</b>:
<div class="posts">
<ul>
{% for post in site.posts %}
<li>
<a href="{{ site.baseurl }}{{ post.url }}">{{post.title}},</a>
<span class="date">{{ post.date | date: "%B %e, %Y" }}</span>
</li>
{% endfor %}
</ul>
</div>