feat: created basic blog layout
This commit is contained in:
parent
42fd071301
commit
0d41db36ef
13 changed files with 935 additions and 3 deletions
27
tags.njk
Normal file
27
tags.njk
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
pagination:
|
||||
data: collections.postsByTag
|
||||
size: 1
|
||||
alias: tag
|
||||
addAllPagesToCollections: true
|
||||
permalink: /tags/{{ tag }}/
|
||||
layout: base.njk
|
||||
---
|
||||
|
||||
<h1>Posts tagged "#{{ collections.postsByTag[tag].name }}"</h1>
|
||||
|
||||
<ul class="post-list">
|
||||
{% for post in collections.postsByTag[tag].posts %}
|
||||
<li>
|
||||
<a href="{{ post.url }}" class="post-card">
|
||||
<h2>{{ post.data.title }}</h2>
|
||||
<time datetime="{{ post.date | dateFormat }}">{{ post.date | dateFormat }}</time>
|
||||
{% if post.data.description %}
|
||||
<p>{{ post.data.description }}</p>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<p><a href="/tags/"><3E> All tags</a></p>
|
||||
Loading…
Add table
Add a link
Reference in a new issue