From: Kai Moritz <kai@juplo.de>
Date: Mon, 7 Mar 2022 22:14:32 +0000 (+0100)
Subject: Kanonische Links über _canonical realisiert
X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;p=website

Kanonische Links über _canonical realisiert
---

diff --git a/dist/sitemap.json b/dist/sitemap.json
index a1a4a2c7..e97ceff8 100644
--- a/dist/sitemap.json
+++ b/dist/sitemap.json
@@ -130,5 +130,6 @@
       "/index.html",
       "/templates/error.html"
     ]
-  }
+  },
+  "_canonical": {}
 }
diff --git a/dist/templates/layout.html b/dist/templates/layout.html
index 16da131a..7175241e 100644
--- a/dist/templates/layout.html
+++ b/dist/templates/layout.html
@@ -5,17 +5,17 @@
     th:fragment="layout(uri,maincontent)"
     thymeproxy:variables="SET:sitemap.json"
     >
-  <head>
+  <head thymeproxy:variables="${json}">
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <title th:replace="${title}">juplo - BASISTEMPLATE</title>
     <link rel="stylesheet" href="../css/juplo.css" th:href="@{/css/juplo.css}">
-    <link rel="caononical" href="layout.html" th:replace="${scripts_head}?:~{}">
+    <link rel="canonical" href="layout.html" th:href="${_canonical.get(uri)}?:${uri}">
+    <script th:replace="${scripts_head}?:~{}"></script>
   </head>
   <body
       th:fragment="body(uri, maincontent, marginalcontent)"
-      thymeproxy:variables="${json}"
       th:with="crumbs=${_crumbs.get(uri)}">
     <div id="page" class="">
       <main class="content section" th:include="${maincontent}" th:fragment="maincontent">