Skip to content
Snippets Groups Projects
Commit 252ec49b authored by Malte Schmitz's avatar Malte Schmitz
Browse files

Do not render titles as paragraphs

Having <p> inside <h2> or <h1> applies the CSS style line-height: 2rem which looks not good
parent dac2b0f6
No related branches found
No related tags found
No related merge requests found
Pipeline #4100 passed
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<li class="item item--post"> <li class="item item--post">
<article class="article article--post"> <article class="article article--post">
<h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title | markdownify }}</a></h2> <h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title | markdownify | remove: '<p>' | remove: '</p>' }}</a></h2>
{% include post-meta.html %} {% include post-meta.html %}
{{ page.excerpt | strip_html | markdownify | truncatewords: 60 }} {{ page.excerpt | strip_html | markdownify | truncatewords: 60 }}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<li class="item item--post"> <li class="item item--post">
<article class="article article--post"> <article class="article article--post">
<h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title | markdownify }}</a></h2> <h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title | markdownify | remove: '<p>' | remove: '</p>' }}</a></h2>
{% include post-meta.html %} {% include post-meta.html %}
{{ page.excerpt | strip_html | markdownify | truncatewords: 60 }} {{ page.excerpt | strip_html | markdownify | truncatewords: 60 }}
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<li class="item item--post"> <li class="item item--post">
<article class="article article--post"> <article class="article article--post">
<h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title | markdownify }}</a></h2> <h2><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title | markdownify | remove: '<p>' | remove: '</p>' }}</a></h2>
{% include post-meta.html %} {% include post-meta.html %}
{{ page.excerpt | strip_html | markdownify | truncatewords: 60 }} {{ page.excerpt | strip_html | markdownify | truncatewords: 60 }}
......
...@@ -10,7 +10,7 @@ layout: default ...@@ -10,7 +10,7 @@ layout: default
<article class="article article--post blogpost content typeset"> <article class="article article--post blogpost content typeset">
<h1>{{ page.title | markdownify}}</h1> <h1>{{ page.title | markdownify | remove: '<p>' | remove: '</p>' }}</h1>
{% include post-meta.html %} {% include post-meta.html %}
{{ content }} {{ content }}
......
  • Owner

    Ah, sehr gut, ich hatte mir eine Notiz gemacht, das lange Titel blöd aussehen, aber das scheint einfach schon erledigt.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment