Start loading posts from Wordpress
This commit is contained in:
1 parent
95d4e45ef0
commit
2430b9f3eb
18 files changed
+48
-233
No files matched your search
+5
-6
@@ -2,9 +2,8 @@
|
||||
title: Blog
|
||||
layout: base.njk
|
||||
pagination:
|
||||
data: collections.posts
|
||||
data: posts
|
||||
size: 5
|
||||
reverse: true
|
||||
---
|
||||
<main class="wrapper-md stack-lg">
|
||||
<h1>Blog posts</h1>
|
||||
@@ -12,10 +11,10 @@ pagination:
|
||||
<ol class="stack-xl">
|
||||
{% for item in pagination.items %}
|
||||
<li class="stack-xs">
|
||||
<h2><a href="{{ item.url }}">{{ item.data.title }}</a></h2>
|
||||
<time class="block">{{ item.date | dateDisplay }}</time>
|
||||
{{ item.page.excerpt | md | safe }}
|
||||
<a href="{{ item.url }}" class="inline-block">Read more</a>
|
||||
<h2><a href="/post/{{ item.slug }}">{{ item.title.rendered }}</a></h2>
|
||||
<time class="block">{{ item.date | parseDate | dateDisplay }}</time>
|
||||
{{ item.excerpt.rendered | safe }}
|
||||
<a href="/post/{{ item.slug }}" class="inline-block">Read more</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
Reference in new issue
Block a user