From a7fbd90fe8cba796a55c8477a47dab81c2e0ef63 Mon Sep 17 00:00:00 2001 From: SupImDos Date: Thu, 16 Feb 2023 19:38:35 +0800 Subject: [PATCH] Revert b95dffa by re-adding h1 headline detection in content partial. --- material/partials/content.html | 3 +-- src/partials/content.html | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/material/partials/content.html b/material/partials/content.html index d756b647e..ff9eedfa0 100644 --- a/material/partials/content.html +++ b/material/partials/content.html @@ -5,8 +5,7 @@ {% include "partials/tags.html" %} {% endif %} {% include "partials/actions.html" %} -{% set first = page.toc | first %} -{% if first and first.level != 1 %} +{% if "\x3ch1" not in page.content %}

{{ page.title | d(config.site_name, true)}}

{% endif %} {{ page.content }} diff --git a/src/partials/content.html b/src/partials/content.html index 6930a1ed1..6ec8b42d9 100644 --- a/src/partials/content.html +++ b/src/partials/content.html @@ -29,11 +29,10 @@ {% include "partials/actions.html" %} -{% set first = page.toc | first %} -{% if first and first.level != 1 %} +{% if "\x3ch1" not in page.content %}

{{ page.title | d(config.site_name, true)}}

{% endif %}