50 lines
1.2 KiB
HTML
50 lines
1.2 KiB
HTML
---
|
|
layout: default
|
|
title: blog
|
|
pagination:
|
|
enabled: true
|
|
collection: posts
|
|
permalink: /page/:num/
|
|
per_page: 3
|
|
sort_field: date
|
|
sort_reverse: true
|
|
trail:
|
|
before: 1
|
|
after: 3
|
|
---
|
|
|
|
<div class="post">
|
|
|
|
<div class="header-bar">
|
|
<h2>{{ site.blog_name }}</h1>
|
|
<!-- <h2>{{ site.blog_description }}</h2> -->
|
|
</div>
|
|
|
|
<ul class="post-list">
|
|
{% for post in paginator.posts %}
|
|
|
|
{% assign read_time = post.content | number_of_words | divided_by: 180 | plus: 1 %}
|
|
{% assign year = post.date | date: "%Y" %}
|
|
{% assign tags = post.tags | join: "" %}
|
|
{% assign categories = post.categories | join: "" %}
|
|
|
|
<li>
|
|
<h3>
|
|
{% if post.redirect == blank %}
|
|
<a class="post-title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
|
{% else %}
|
|
<a class="post-title" href="{% if post.redirect contains '://' %}{{ post.redirect }}{% else %}{{ post.redirect | relative_url }}{% endif %}">{{ post.title }}</a>
|
|
{% endif %}
|
|
</h3>
|
|
<p>{{ post.description }}</p>
|
|
<p class="post-meta"> {{read_time}} min read ·
|
|
{{ post.date | date: '%B %-d, %Y' }}
|
|
</p>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% include pagination.html %}
|
|
|
|
</div>
|