~jan0sch/smederee

Showing details for patch 5ccc67fb3859446a6b12d82dc202ac22218d1033.
2023-08-08 (Tue), 3:06 PM - Jens Grassel - 5ccc67fb3859446a6b12d82dc202ac22218d1033

Hub: Fix rendering of meta tags object to properly render set attributes.

Summary of changes
1 files modified with 4 lines added and 1 lines removed
  • modules/hub/src/main/twirl/de/smederee/hub/views/meta.scala.html with 4 added and 1 removed lines
diff -rN -u old-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/meta.scala.html new-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/meta.scala.html
--- old-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/meta.scala.html	2025-01-15 16:26:01.667673769 +0000
+++ new-smederee/modules/hub/src/main/twirl/de/smederee/hub/views/meta.scala.html	2025-01-15 16:26:01.667673769 +0000
@@ -1,4 +1,7 @@
 @(tags: MetaTags)
 @for(description <- tags.description){<meta name="description" content="@description" />}
-@if(tags.keywords.nonEmpty){<meta name="keywords" content="@{tags.keywords.mkString}">}
+@if(tags.keywords.nonEmpty){<meta name="keywords" content="@{tags.keywords.mkString}" />} else {}
 @for(referrer <- tags.referrer){<meta name="referrer" content="@{referrer.tag}" />}
+@defining(tags.robots.map(_.tag).mkString(",")) { robots =>
+  @if(robots.nonEmpty){<meta name="robots" content="@robots" />} else {}
+}