Move tags
This commit is contained in:
parent
a0234a21d4
commit
018492edf2
3 changed files with 0 additions and 0 deletions
32
source/articles/tags.html
Normal file
32
source/articles/tags.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
layout: default
|
||||
nav: blog
|
||||
title: Tags
|
||||
use:
|
||||
- posts_tags
|
||||
---
|
||||
{% set rows = {} %}
|
||||
{% for tag, posts in data.posts_tags %}
|
||||
{% set rows = rows|merge({ (tag): posts|length }) %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tag</th>
|
||||
<th>Number of posts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for tag, post_count in rows|sort|reverse %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>
|
||||
</td>
|
||||
<td>{{ post_count }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
39
source/articles/tags/tag.html
Normal file
39
source/articles/tags/tag.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
layout: default
|
||||
title: Tag Archive
|
||||
generator:
|
||||
- posts_tag_index
|
||||
---
|
||||
{% 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 %}
|
||||
<h1>Tag: {{ page.tag }}</h1>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Post Title</th>
|
||||
<th class="w-48">Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for post in page.tag_posts %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ post.url }}">
|
||||
{{ post.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ post.date|date('j F Y') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
32
source/articles/tags/tag.xml
Normal file
32
source/articles/tags/tag.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
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 %}
|
||||
</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>
|
||||
{% if post.summary %}
|
||||
<content type="html"><![CDATA[{{ post.summary|markdown }}]]></content>
|
||||
{% elseif post.blocks.excerpt %}
|
||||
<content type="html"><![CDATA[{{ post.blocks.excerpt|markdown }}]]></content>
|
||||
{% else %}
|
||||
<content type="html"><![CDATA[{{ post.blocks.content|markdown }}]]></content>
|
||||
{% endif %}
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
Loading…
Add table
Add a link
Reference in a new issue