Add support for metatags

This commit is contained in:
Alex 2026-06-08 14:12:08 -07:00
parent ae440be40c
commit 4564aa9534
25 changed files with 230 additions and 22 deletions

View file

@ -1,25 +1,35 @@
{% extends 'base.html.twig' %}
{% block title %}Tags | Alex Daniels{% endblock %}
{% block title %}{{title}} - Tags | Alex Daniels{% endblock %}
{% block metatitle %}{{title}} - Tags | Alex Daniels {% endblock %}
{% block ogtitle %}{{title}} - Tags | Alex Daniels {% endblock %}
{% block twittertitle %}Writing and Albums that contain the tag '{{title}}'{% endblock %}
{% block metadescription %}Writing and Albums that contain the tag '{{title}}'{% endblock %}
{% block ogdescription %}Writing and Albums that contain the tag '{{title}}'{% endblock %}
{% block twitterdescription %}Writing and Albums that contain the tag '{{title}}'{% endblock %}
{% block body %}
<section class="tag">
<h2>{{title}}</h2>
{% if posts|length %}
<div class="posts">
<h2>Posts</h2>
<h3>Posts</h3>
<ul>
{% for post in posts %}
<li><a href="/words/{{post.url}}">{{post.title}}</a></li>
<li><a href="/words/{{post.url}}">{{post.title}} - {{ post.date|date('l M d Y') }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if photos|length %}
<div class="photos">
<h2>Photos</h2>
<h3>Photos</h3>
<ul>
{% for photo in photos %}
<li><a href="/photos/{{photo.url}}">{{photo.title}}</a></li>
<li><a href="/photos/{{photo.url}}">{{photo.title}} - {{ photo.date|date('l M d Y') }}</a></li>
{% endfor %}
</ul>
</div>

View file

@ -2,6 +2,13 @@
{% block title %}Tags | Alex Daniels{% endblock %}
{% block metatitle %}Tags | Alex Daniels {% endblock %}
{% block ogtitle %}Tags | Alex Daniels {% endblock %}
{% block twittertitle %}Tags used in posts and albums{% endblock %}
{% block metadescription %}Tags used in posts and albums{% endblock %}
{% block ogdescription %}Tags used in posts and albums{% endblock %}
{% block twitterdescription %}Tags used in posts and albums{% endblock %}
{% block body %}
<section class="tags">
<h2>Tags</h2>