Skip to content
Snippets Groups Projects
Commit b95dffa5 authored by squidfunk's avatar squidfunk
Browse files

Removed level 1 headline hack in content partial

parent 39013249
No related branches found
Tags 9.0.0
No related merge requests found
......@@ -5,7 +5,8 @@
{% include "partials/tags.html" %}
{% endif %}
{% include "partials/actions.html" %}
{% 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 %}
{{ page.content }}
......
......@@ -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 %}
......
......@@ -31,7 +31,7 @@
{% set toc = page.toc %}
<!--
Hack: check whether the content contains a h1 headline. If it does, the
Check whether the content starts with a level 1 headline. If it does, the
top-level anchor must be skipped, since it would be redundant to the link
to the current page that is located just above the anchor. Therefore we
directly continue with the children of the anchor.
......
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