get the 'all tags' function to work
This commit is contained in:
parent
2bea4c6dfd
commit
9fddbf763f
3 changed files with 34 additions and 22 deletions
|
@ -4,15 +4,21 @@
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
{{ section.title }}
|
{{ section.title }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<p class="larger">sort by <a href="/tags">tags</a>.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<!-- If you are using pagination, section.pages will be empty.
|
<!-- If you are using pagination, section.pages will be empty.
|
||||||
You need to use the paginator object -->
|
You need to use the paginator object -->
|
||||||
{% for page in section.pages %}
|
{% for page in section.pages %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> - by {{ page.authors }},
|
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> - by {{ page.authors }}
|
||||||
{{ page.date }}
|
|
||||||
<br>
|
<br>
|
||||||
{{ page.description }}
|
{{ page.description }}
|
||||||
|
<br>
|
||||||
|
written: {{ page.date }}
|
||||||
|
<br>
|
||||||
|
tags: {{ page.taxonomies.tags }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,8 +1,21 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% if page.taxonomies.tags %}
|
{%- block title -%}
|
||||||
tags:
|
{{ title_macros::title(page_title="Tags", main_title=config.title) }}
|
||||||
{% for tag in page.taxonomies.tags %}
|
{%- endblock -%}
|
||||||
<a href='{{ get_taxonomy_url(kind="tags", name=tag) | safe }}'>{{ tag }}</a>
|
|
||||||
{% endfor %}
|
{% block content %}
|
||||||
{% endif %}
|
<div class="post">
|
||||||
|
<h1 class="post-title">all tags</h1>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{% for term in terms %}
|
||||||
|
<li class="tag-list">
|
||||||
|
<a href="{{ term.permalink | safe }}">
|
||||||
|
{{ term.name }} ({{ term.pages | length }} post{{ term.pages | length | pluralize }})
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% block title %}
|
|
||||||
{{ config.title }} · <a href="/tags">tags</a> · {{ term.name }}
|
|
||||||
{% endblock title %}
|
|
||||||
|
|
||||||
<h1>{{ term.name }}</h1>
|
<h1>{{ term.name }}</h1>
|
||||||
|
|
||||||
<div class="page-intro">
|
<div class="page-intro">
|
||||||
|
@ -15,15 +10,13 @@
|
||||||
<ul class="postlist">
|
<ul class="postlist">
|
||||||
{% for page in term.pages | sort(attribute="date") | reverse %}
|
{% for page in term.pages | sort(attribute="date") | reverse %}
|
||||||
<li class="postlist-item">
|
<li class="postlist-item">
|
||||||
{% if page.date %}
|
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> - by {{ page.authors }}
|
||||||
<div class="date">
|
<br>
|
||||||
<time class="postlist-date">{{ page.date }}</time>
|
{{ page.description }}
|
||||||
</div>
|
<br>
|
||||||
{% endif %}
|
written: {{ page.date }}
|
||||||
<div class="postlist-head">
|
<br>
|
||||||
<h2><a class="postlist-title" href="{{ page.permalink }}">{{ page.title }}</a></h2>
|
tags: {{ page.taxonomies.tags }}
|
||||||
</div>
|
|
||||||
<p class="postlist-description">{{ page.description }}</p>
|
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue