aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/posts/posts.html
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-04-08 21:48:00 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-04-08 21:48:00 +0300
commit4921508f085d4521c315c55653f3d8005b696afb (patch)
tree0c4a4b1f5b9a0a5ad3fb13a4560180d0115766fa /_includes/posts/posts.html
parentuse relative_url instead of site.baseurl (diff)
downloadjekyll-theme-4921508f085d4521c315c55653f3d8005b696afb.tar.gz
jekyll-theme-4921508f085d4521c315c55653f3d8005b696afb.zip
_includes: add posts.html
Diffstat (limited to '_includes/posts/posts.html')
-rw-r--r--_includes/posts/posts.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/_includes/posts/posts.html b/_includes/posts/posts.html
new file mode 100644
index 0000000..4f52efc
--- /dev/null
+++ b/_includes/posts/posts.html
@@ -0,0 +1,17 @@
+{% if site.posts.size == 0 %}
+ <p class="h3">Sorry, no posts have been added yet.</p>
+ <hr/>
+{% else %}
+ {% for post in paginator.posts %}
+ <h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
+ <p class="text-muted">
+ <span class="glyphicon glyphicon-time"></span>&nbsp;Posted on {{ post.date | date: '%-d %B %Y' }}
+ {%- if post.category %} in <span class="glyphicon glyphicon-folder-open"></span>&nbsp;<a class="category" href="{{ '/categories/' | relative_url }}{{ post.category | slugify: 'pretty' }}/">{{ post.category }}</a>{% endif %}
+ </p>
+ {{ post.excerpt | markdownify }}
+ <hr/>
+ {% endfor %}
+ <div class="text-center">
+ {% include common/paginator.html %}
+ </div>
+{% endif %}