-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposts.html
53 lines (50 loc) · 1.56 KB
/
posts.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
---
layout: default
title: All Posts
permalink: /posts
description: Add a description of this page here. This will appear in Google results.
---
<div>
<h1 class="post-title">{{ page.title | escape }}</h1>
{% if site.paginate %}
{% assign posts = paginator.posts %}
{% else %}
{% assign posts = site.posts %}
{% endif %}
{%- if posts.size > 0 -%}
{%- if page.list_title -%}
<h2 class="post-list-heading">{{ page.list_title }}</h2>
{%- endif -%}
<ul class="post-list">
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
{%- for post in posts -%}
<li>
<h3 style="margin-bottom: -0.4rem;">
<a href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
<span class="post-meta">{{ post.date | date: date_format }} {%- if post.last_modified_at -%} ~ {{ post.last_modified_at | date: date_format}}{%- endif -%}</span>
<span class="post-meta">
| {{ post.category }}
{% if post.tags.size > 0 %}
| Tags:
{% if site.link-tags %}
{% for tag in post.tags %}
<a href="{{ '/tags' | relative_url }}#{{- tag -}}">{{- tag -}}</a>
{% endfor %}
{% else %}
{{ post.tags | join: ", " }}
{% endif %}
{% endif %}
</span>
{%- if post.description -%}
<p class="post-description-all-posts">
{{ post.description }}
</p>
{%- endif -%}
</li>
{%- endfor -%}
</ul>
{%- endif -%}
</div>