Add posts, categories, category, tags, tag, and collection layouts

Replace sample pages with hard coded HTML and Liquid in favor of a layout that does all the heavy lifting. Assign the appropriate `layout` via YAML Front Matter and away you go.
This commit is contained in:
Michael Rose
2018-03-20 12:45:28 -04:00
parent 2463b55c4c
commit d6605146ac
13 changed files with 246 additions and 3 deletions

View File

@ -0,0 +1,19 @@
{% assign entries = site[include.collection] %}
{% if include.sort_by == 'title' %}
{% if include.sort_order == 'reverse' %}
{% assign entries = entries | sort: 'title' | reverse %}
{% else %}
{% assign entries = entries | sort: 'title' %}
{% endif %}
{% elsif include.sort_by == 'date' %}
{% if include.sort_order == 'reverse' %}
{% assign entries = entries | sort: 'date' | reverse %}
{% else %}
{% assign entries = entries | sort: 'date' %}
{% endif %}
{% endif %}
{%- for post in entries -%}
{% include archive-single.html %}
{%- endfor -%}

View File

@ -0,0 +1,3 @@
{%- for post in site.categories[include.taxonomy] -%}
{% include archive-single.html %}
{%- endfor -%}

3
_includes/posts-tag.html Normal file
View File

@ -0,0 +1,3 @@
{%- for post in site.tags[include.taxonomy] -%}
{% include archive-single.html %}
{%- endfor -%}