Эх сурвалжийг харах

fix: improve HTML5 validation: remove nested `<p>`s

Blackfriday automatically wraps Markdown `Content` text in `<p>` tags.
No need to wrap in additional `<p>` tags (which is also invalid HTML).

See #1197
Alessandro Bahgat 6 жил өмнө
parent
commit
c56020be63

+ 1 - 1
layouts/partials/widgets/accomplishments.html

@@ -8,7 +8,7 @@
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
   </div>
   <div class="col-12 col-lg-8">
-    {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
+    {{ with $page.Content }}{{ . }}{{ end }}
 
     {{ if $page.Params.item }}
     {{ range $idx, $key := sort $page.Params.item ".date_start" "desc" }}

+ 1 - 1
layouts/partials/widgets/contact.html

@@ -9,7 +9,7 @@
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
   </div>
   <div class="col-12 col-lg-8">
-    {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
+    {{ with $page.Content }}{{ . }}{{ end }}
 
     {{ if $page.Params.email_form }}
 

+ 1 - 1
layouts/partials/widgets/experience.html

@@ -8,7 +8,7 @@
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
   </div>
   <div class="col-12 col-lg-8">
-    {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
+    {{ with $page.Content }}{{ . }}{{ end }}
 
     {{ if $page.Params.experience }}
     {{ $exp_len := len $page.Params.experience }}

+ 1 - 1
layouts/partials/widgets/featured.html

@@ -38,7 +38,7 @@
   </div>
   <div class="col-12 col-lg-8">
 
-    {{ with $st.Content }}<p>{{ . }}</p>{{ end }}
+    {{ with $st.Content }}{{ . }}{{ end }}
 
     {{ range $post := $query }}
       {{ if eq $st.Params.design.view 1 }}

+ 1 - 1
layouts/partials/widgets/featurette.html

@@ -11,7 +11,7 @@
 
   {{ with $page.Content }}
   <div class="col-md-12">
-    <p>{{ . | markdownify }}</p>
+    {{ . }}
   </div>
   {{ end }}
 

+ 1 - 1
layouts/partials/widgets/pages.html

@@ -72,7 +72,7 @@
   </div>
   <div class="col-12 col-lg-8">
 
-    {{ with $st.Content }}<p>{{ . }}</p>{{ end }}
+    {{ with $st.Content }}{{ . }}{{ end }}
 
     {{ range $post := $query }}
       {{ if eq $st.Params.design.view 1 }}

+ 1 - 1
layouts/partials/widgets/people.html

@@ -11,7 +11,7 @@
 
   {{ with $page.Content }}
   <div class="col-md-12">
-    <p>{{ . }}</p>
+    {{ . }}
   </div>
   {{ end }}
 

+ 1 - 1
layouts/partials/widgets/portfolio.html

@@ -30,7 +30,7 @@
   <div>
 {{ end }}
 
-    {{ with $st.Content }}<p>{{ . }}</p>{{ end }}
+    {{ with $st.Content }}{{ . }}{{ end }}
 
     {{ if $st.Params.content.filter_button }}
 

+ 1 - 1
layouts/partials/widgets/tag_cloud.html

@@ -7,7 +7,7 @@
     {{ with $page.Params.subtitle }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
   </div>
   <div class="col-12 col-lg-8">
-    {{ with $page.Content }}<p>{{ . }}</p>{{ end }}
+    {{ with $page.Content }}{{ . }}{{ end }}
 
     {{ if not (eq (len site.Taxonomies.tags) 0) }}
       {{ $fontSmall := 0.8 }}