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">
|
||||
{{ section.title }}
|
||||
</h1>
|
||||
|
||||
<p class="larger">sort by <a href="/tags">tags</a>.</p>
|
||||
|
||||
<ul>
|
||||
<!-- If you are using pagination, section.pages will be empty.
|
||||
You need to use the paginator object -->
|
||||
{% for page in section.pages %}
|
||||
<li>
|
||||
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> - by {{ page.authors }},
|
||||
{{ page.date }}
|
||||
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> - by {{ page.authors }}
|
||||
<br>
|
||||
{{ page.description }}
|
||||
<br>
|
||||
written: {{ page.date }}
|
||||
<br>
|
||||
tags: {{ page.taxonomies.tags }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% if page.taxonomies.tags %}
|
||||
tags:
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<a href='{{ get_taxonomy_url(kind="tags", name=tag) | safe }}'>{{ tag }}</a>
|
||||
{%- block title -%}
|
||||
{{ title_macros::title(page_title="Tags", main_title=config.title) }}
|
||||
{%- endblock -%}
|
||||
|
||||
{% block content %}
|
||||
<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 %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% block title %}
|
||||
{{ config.title }} · <a href="/tags">tags</a> · {{ term.name }}
|
||||
{% endblock title %}
|
||||
|
||||
<h1>{{ term.name }}</h1>
|
||||
|
||||
<div class="page-intro">
|
||||
|
@ -15,15 +10,13 @@
|
|||
<ul class="postlist">
|
||||
{% for page in term.pages | sort(attribute="date") | reverse %}
|
||||
<li class="postlist-item">
|
||||
{% if page.date %}
|
||||
<div class="date">
|
||||
<time class="postlist-date">{{ page.date }}</time>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="postlist-head">
|
||||
<h2><a class="postlist-title" href="{{ page.permalink }}">{{ page.title }}</a></h2>
|
||||
</div>
|
||||
<p class="postlist-description">{{ page.description }}</p>
|
||||
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> - by {{ page.authors }}
|
||||
<br>
|
||||
{{ page.description }}
|
||||
<br>
|
||||
written: {{ page.date }}
|
||||
<br>
|
||||
tags: {{ page.taxonomies.tags }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue