Add canonical tags to the plain template

This commit is contained in:
2026-08-06 23:14:42 +02:00
parent eeff006347
commit 4bdf1b4f4e
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
{% block title %}{{ article.title }} — {{ site.name }}{% endblock %} {% block title %}{{ article.title }} — {{ site.name }}{% endblock %}
{% block head %}<link rel="canonical" href="{{ site.origin }}{{ site.base_dir }}{{ article.uri }}">{% endblock %}
{% block main %} {% block main %}
<article> <article>
<header> <header>
+1
View File
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{{ site.name }}{% endblock %}</title> <title>{% block title %}{{ site.name }}{% endblock %}</title>
<link rel="stylesheet" href="{{ site.base_dir }}pygments.css"> <link rel="stylesheet" href="{{ site.base_dir }}pygments.css">
{% block head %}{% endblock %}
</head> </head>
<body> <body>
<header> <header>
+2
View File
@@ -2,6 +2,8 @@
{% block title %}{% if section %}{{ section }} — {% endif %}{{ site.name }}{% if page_num > 1 %} — Page {{ page_num }}{% endif %}{% endblock %} {% block title %}{% if section %}{{ section }} — {% endif %}{{ site.name }}{% if page_num > 1 %} — Page {{ page_num }}{% endif %}{% endblock %}
{% block head %}<link rel="canonical" href="{{ site.origin }}{{ site.base_dir }}{% if section %}{{ section }}/{% endif %}{% if page_num == 1 %}{% else %}page-{{ page_num }}.html{% endif %}">{% endblock %}
{% block main %} {% block main %}
{% if section %}<h1>{{ section }}</h1>{% endif %} {% if section %}<h1>{{ section }}</h1>{% endif %}
{% for item in items %} {% for item in items %}