Removed level 1 headline hack in content partial

This commit is contained in:
squidfunk
2023-01-02 11:27:41 +01:00
parent 39013249a5
commit b95dffa5cd
3 changed files with 6 additions and 4 deletions

View File

@@ -29,10 +29,11 @@
{% include "partials/actions.html" %}
<!--
Hack: check whether the content contains a h1 headline. If it doesn't, the
Check whether the content starts with a level 1 headline. If it doesn't, the
page title (or respectively site name) is used as the main headline.
-->
{% if "\x3ch1" not in page.content %}
{% set first = page.toc | first %}
{% if first and first.level != 1 %}
<h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %}