]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
create/skeletons: Wrap section and home lists with section tags
authorSardorbek Imomaliev <3041675+imomaliev@users.noreply.github.com>
Sun, 12 Oct 2025 21:47:49 +0000 (22:47 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 14 Oct 2025 09:54:45 +0000 (11:54 +0200)
Avoiding issues with tag leakage when using .Summary
See issue #14044 for details.

create/skeletons/theme/layouts/home.html
create/skeletons/theme/layouts/section.html

index 0df65974276f6b3860367626d7b3f92c3fe3fccd..0c764256df22f8039425aa0b503bf6c20615f6bc 100644 (file)
@@ -1,7 +1,9 @@
 {{ define "main" }}
   {{ .Content }}
   {{ range site.RegularPages }}
-    <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
-    {{ .Summary }}
+    <section>
+      <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+      {{ .Summary }}
+    </section>
   {{ end }}
 {{ end }}
index 50fc92d40df8adca45f155a0bbb483ce36b3ee1b..748f2f55938c1360aafdf30a3278ffe443c2031d 100644 (file)
@@ -2,7 +2,9 @@
   <h1>{{ .Title }}</h1>
   {{ .Content }}
   {{ range .Pages }}
-    <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
-    {{ .Summary }}
+    <section>
+      <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+      {{ .Summary }}
+    </section>
   {{ end }}
 {{ end }}