_data
_docs
_drafts
_includes
_layouts
_pages
404.md
about.md
category-archive.html
collection-archive.html
lorem-ipsum.md
page-a.md
page-archive.html
page-b.md
portfolio-archive.html
recipes-archive.html
sample-page.md
sitemap.md
splash-page.md
tag-archive.html
year-archive.html
_pets
_portfolio
_posts
_recipes
assets
images
.editorconfig
.gitattributes
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
_config.dev.yml
_config.yml
index.html
package.json
17 lines
490 B
HTML
17 lines
490 B
HTML
---
|
|
layout: archive
|
|
permalink: /year-archive/
|
|
title: "Posts by Year"
|
|
author_profile: false
|
|
---
|
|
|
|
{% include base_path %}
|
|
{% capture written_year %}'None'{% endcapture %}
|
|
{% for post in site.posts %}
|
|
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
|
|
{% if year != written_year %}
|
|
<h2 id="{{ year | slugify }}" class="archive__subtitle">{{ year }}</h2>
|
|
{% capture written_year %}{{ year }}{% endcapture %}
|
|
{% endif %}
|
|
{% include archive-single.html %}
|
|
{% endfor %} |