From ace7e467da4558e9fc0084a9734d8dbe8196c84c Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 15 Feb 2026 19:53:22 +0100 Subject: Only add title if there's one --- gemini-to-web/src/gemini_to_web/html.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gemini-to-web') diff --git a/gemini-to-web/src/gemini_to_web/html.py b/gemini-to-web/src/gemini_to_web/html.py index a8a42ec..e3a5d45 100644 --- a/gemini-to-web/src/gemini_to_web/html.py +++ b/gemini-to-web/src/gemini_to_web/html.py @@ -25,7 +25,9 @@ def to_html(parsed: list[parser.GemElement], title_extractor=first_header_title_ head = [] if title_extractor: - head.append(htmlgenerator.TITLE(title_extractor(parsed))) + title = title_extractor(parsed) + if title: + head.append(htmlgenerator.TITLE()) if extra_head: head += extra_head -- cgit v1.2.3