This commit is contained in:
Oliver Davies 2019-06-21 08:28:06 +01:00
commit c93aeb1a16
47 changed files with 10312 additions and 0 deletions

View file

@ -0,0 +1,13 @@
---
layout: default
title: Categories
use:
- posts_categories
---
<h2>Categories</h2>
<div>
{% for category,posts in data.posts_categories %}
<a href="{{ site.url }}/blog/categories/{{ category|url_encode(true) }}">{{ category }}</a>
{% endfor %}
</div>

View file

@ -0,0 +1,47 @@
---
layout: default
title: Category Archive
generator: [posts_category_index, pagination]
pagination:
provider: page.category_posts
---
{% block head_meta %}
<link rel="alternate" type="application/atom+xml" href="{{ site.url }}/blog/categories/{{ page.category|url_encode(true) }}.xml" title="{{ site.title }} '{{ page.category }}' category feed" />
<meta name="robots" content="noindex, follow">
{% endblock %}
{% block title %}{{ page.title }} "{{ page.category }}"{% endblock %}
{% block content %}
{% set year = '0' %}
<h2>"{{ page.category }}"</h2>
{% for post in page.pagination.items %}
{% set this_year %}{{ post.date | date("Y") }}{% endset %}
{% if year != this_year %}
{% set month = '0' %}
{% set year = this_year %}
{% endif %}
{% set this_month %}{{ post.date | date("F") }}{% endset %}
{% if month != this_month %}
{% set month = this_month %}
<h3>{{ month }} {{ year }}</h3>
{% endif %}
<article>
<div><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></div>
</article>
{% endfor %}
<div>
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav class="article clearfix">
{% if page.pagination.previous_page %}
<a class="previous" href="{{ site.url }}{{ page.pagination.previous_page.url }}" title="Previous Page"><span class="title">Previous Page</span></a>
{% endif %}
{% if page.pagination.next_page %}
<a class="next" href="{{ site.url }}{{ page.pagination.next_page.url }}" title="Next Page"><span class="title">Next Page</span></a>
{% endif %}
</nav>
{% endif %}
</div>
{% endblock content %}

View file

@ -0,0 +1,28 @@
---
generator: [posts_category_index]
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[{{ site.title }}]]></title>
<link href="{{ site.url }}{{ page.url }}" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ site.calculated_date | date('c') }}</updated>
<id>{{ site.url }}/</id>
{% if site.author or site.email %}
<author>
{% if site.author %}<name><![CDATA[{{ site.author }}]]></name>{% endif %}
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
</author>
{% endif %}
<generator uri="http://sculpin.io/">Sculpin</generator>
{% for post in page.category_posts|slice(0, 10) %}
<entry>
<title type="html"><![CDATA[{{ post.title }}]]></title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date|date('c') }}</updated>
<id>{{ site.url }}{{ post.url }}</id>
<content type="html"><![CDATA[{{ post.blocks.content|raw }}]]></content>
</entry>
{% endfor %}
</feed>

13
source/blog/tags.html Normal file
View file

@ -0,0 +1,13 @@
---
layout: default
title: Tags
use:
- posts_tags
---
<h2>Tags</h2>
<div>
{% for tag,posts in data.posts_tags %}
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>
{% endfor %}
</div>

47
source/blog/tags/tag.html Normal file
View file

@ -0,0 +1,47 @@
---
layout: default
title: Tag Archive
generator: [posts_tag_index, pagination]
pagination:
provider: page.tag_posts
---
{% block head_meta %}
<link rel="alternate" type="application/atom+xml" href="{{ site.url }}/blog/tags/{{ page.tag|url_encode(true) }}.xml" title="{{ site.title }} '{{ page.tag }}' tag feed" />
<meta name="robots" content="noindex, follow">
{% endblock %}
{% block title %}{{ page.title }} "{{ page.tag }}"{% endblock %}
{% block content %}
{% set year = '0' %}
<h2>"{{ page.tag }}"</h2>
{% for post in page.pagination.items %}
{% set this_year %}{{ post.date | date("Y") }}{% endset %}
{% if year != this_year %}
{% set month = '0' %}
{% set year = this_year %}
{% endif %}
{% set this_month %}{{ post.date | date("F") }}{% endset %}
{% if month != this_month %}
{% set month = this_month %}
<h3>{{ month }} {{ year }}</h3>
{% endif %}
<article>
<div><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></div>
</article>
{% endfor %}
<div>
{% if page.pagination.previous_page or page.pagination.next_page %}
<nav class="article clearfix">
{% if page.pagination.previous_page %}
<a class="previous" href="{{ site.url }}{{ page.pagination.previous_page.url }}" title="Previous Page"><span class="title">Previous Page</span></a>
{% endif %}
{% if page.pagination.next_page %}
<a class="next" href="{{ site.url }}{{ page.pagination.next_page.url }}" title="Next Page"><span class="title">Next Page</span></a>
{% endif %}
</nav>
{% endif %}
</div>
{% endblock content %}

28
source/blog/tags/tag.xml Normal file
View file

@ -0,0 +1,28 @@
---
generator: [posts_tag_index]
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[{{ site.title }}]]></title>
<link href="{{ site.url }}{{ page.url }}" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ site.calculated_date | date('c') }}</updated>
<id>{{ site.url }}/</id>
{% if site.author or site.email %}
<author>
{% if site.author %}<name><![CDATA[{{ site.author }}]]></name>{% endif %}
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
</author>
{% endif %}
<generator uri="http://sculpin.io/">Sculpin</generator>
{% for post in page.tag_posts|slice(0, 10) %}
<entry>
<title type="html"><![CDATA[{{ post.title }}]]></title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date|date('c') }}</updated>
<id>{{ site.url }}{{ post.url }}</id>
<content type="html"><![CDATA[{{ post.blocks.content|raw }}]]></content>
</entry>
{% endfor %}
</feed>