aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2026-02-15 19:53:22 +0100
committeralex <alex@pdp7.net>2026-02-15 19:53:22 +0100
commitace7e467da4558e9fc0084a9734d8dbe8196c84c (patch)
tree75a373f9487e30fedda38aefea39b01702087dfd
parentfea0a8409e558a23c80d52ea24ae4913457dac24 (diff)
Only add title if there's one
-rw-r--r--gemini-to-web/src/gemini_to_web/html.py4
1 files changed, 3 insertions, 1 deletions
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