Added archive_post partial
Added post_category partial Added archives page
This commit is contained in:
parent
87c9dc6430
commit
62c9780c67
8
themes/classic/source/_includes/archive_post.html
Normal file
8
themes/classic/source/_includes/archive_post.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{% capture category %}{{ post.categories | size }}{% endcapture %}
|
||||||
|
<h1><a href="{{ post.url }}">{{post.title}}</a></h1>
|
||||||
|
<time datetime="{{ post.date | datetime }}" pubdate>{{ post.date | date: "<span class='month'>%b</span> <span class='day'>%d</span> <span class='year'>%Y</span>"}}</time>
|
||||||
|
{% if category != '0' %}
|
||||||
|
<footer>
|
||||||
|
<span class="categories">posted in {{ post.categories | category_links }}</span>
|
||||||
|
</footer>
|
||||||
|
{% endif %}
|
10
themes/classic/source/_includes/post_categories.html
Normal file
10
themes/classic/source/_includes/post_categories.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %}
|
||||||
|
{% unless category == '0' %}
|
||||||
|
<span class="categories"> in
|
||||||
|
{% if post %}
|
||||||
|
{{ post.categories | category_links }}
|
||||||
|
{% else %}
|
||||||
|
{{ page.categories | category_links }}
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
{% endunless %}
|
17
themes/classic/source/archives.html
Normal file
17
themes/classic/source/archives.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
layout: post
|
||||||
|
title: Blog Archive
|
||||||
|
no_meta: true
|
||||||
|
---
|
||||||
|
<div class="blog-archives">
|
||||||
|
{% for post in site.posts reverse %}
|
||||||
|
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
||||||
|
{% unless year == this_year %}
|
||||||
|
{% assign year = this_year %}
|
||||||
|
<h2>{{ year }}</h2>
|
||||||
|
{% endunless %}
|
||||||
|
<article>
|
||||||
|
{% include archive_post.html %}
|
||||||
|
</article>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user