Set blog navigation items
This commit is contained in:
parent
4a1e98f337
commit
380a9f3eb9
|
@ -1,5 +1,11 @@
|
|||
<aside class="right-sidebar">
|
||||
<nav class="blog__nav">
|
||||
<h2 class="blog__nav--title">Blog Navigation</h2>
|
||||
<ul class="blog__nav--links">
|
||||
{% for page in collections["blog pages"] %}
|
||||
<li><a href="{{ page.url }}">{{ page.data.blogNav }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"tags": "blog pages"
|
||||
}
|
|
@ -8,4 +8,35 @@ title: Blog Archive
|
|||
layout: main/content
|
||||
tags: blog pages
|
||||
blogNav: Archive
|
||||
---
|
||||
---
|
||||
|
||||
<ul class="blog__postlist">
|
||||
{% for post in postList %}
|
||||
<li>
|
||||
<h2 class="blog__title">
|
||||
<a href="{{ post.url }}">
|
||||
{% if post.data.title %}{{ post.data.articleTitle }}
|
||||
{% else %}
|
||||
<code>{{ post.url }}</code>
|
||||
{% endif %}
|
||||
</a>
|
||||
</h2>
|
||||
<time>{{ post.date | niceDate }}</time>
|
||||
<p>{{ post.data.desc }}</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<p class="center-text">
|
||||
{% if pagination.href.previous %}
|
||||
<a href=" {{ pagination.href.previous }}">Previous</a>
|
||||
{% else %}
|
||||
Previous
|
||||
{% endif %}
|
||||
/
|
||||
{% if pagination.href.next %}
|
||||
<a href=" {{ pagination.href.next }}">Next</a>
|
||||
{% else %}
|
||||
Next
|
||||
{% endif %}
|
||||
</p>
|
||||
|
|
|
@ -4,6 +4,7 @@ title: Blog
|
|||
desc: Blog hosted on Leilukin's personal website.
|
||||
tags: blog pages
|
||||
pageTitle: Welcome to Leilukin's Hub Blog!
|
||||
blogNav: Blog Home
|
||||
pagination:
|
||||
data: collections.posts
|
||||
size: 5
|
||||
|
|
Loading…
Reference in New Issue