changeset 8351:e775cd258763

docs: fix canonical link for www.roundup-tracker.org index page the index page canonical link was: https://www...org/index.html change the template so the canonical is set to https://www...org/ as that is how it's listed by crawlers.
author John Rouillard <rouilj@ieee.org>
date Wed, 02 Jul 2025 12:26:21 -0400
parents d94bba15b65e
children 6ea309c6d17c
files website/www/_templates/layout.html
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/website/www/_templates/layout.html	Wed Jul 02 12:24:03 2025 -0400
+++ b/website/www/_templates/layout.html	Wed Jul 02 12:26:21 2025 -0400
@@ -48,7 +48,13 @@
         content="Page {{ pagename }} in documentation on the Roundup issue tracker, version {{ release|e }}.">
     {%- endif %}
     {%- if pageurl %}
+      {%- if pageurl.endswith("org/index.html") %}
+      <!-- strip the index.html to make
+           https://www.roundup-tracker.org/ canonical -->
+    <link rel="canonical" href="{{ pageurl[:-10] }}" />
+      {%- else %}
     <link rel="canonical" href="{{ pageurl|e }}" />
+      {%- endif %}
     {%- endif %}
     {%- if use_opensearch %}
     <link rel="search" type="application/opensearchdescription+xml"

Roundup Issue Tracker: http://roundup-tracker.org/