I want to write some content for a tag page, say, /tag/football, where ‘football’ is, for example, the tag I want to write content about, probably by adding the html etc. in a partial. Note: I am not writing about football, just giving this as an example:
if tag == football
{% include "partials/football.html" %}
{ endif }
{ else }
{% block content %}
{% block title %}
{{ term.name | capitalize }} · {{ config.title }}
{% endblock title %}
{{ term.name | capitalize }}
<p class="larger">View all tags.</p>
<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 | date(format="%d %B %Y") }}</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>
</li>
{% endfor %}
</ul>
{% endblock content %}
I realise this is simple stuff, but I can’t quite figure it out – reminds me too much of PHP, which I never did quite grasp. Any help is much appreciated!