diff options
| author | alex <alex@pdp7.net> | 2026-02-15 19:53:22 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2026-02-15 19:53:22 +0100 |
| commit | ace7e467da4558e9fc0084a9734d8dbe8196c84c (patch) | |
| tree | 75a373f9487e30fedda38aefea39b01702087dfd | |
| parent | fea0a8409e558a23c80d52ea24ae4913457dac24 (diff) | |
Only add title if there's one
| -rw-r--r-- | gemini-to-web/src/gemini_to_web/html.py | 4 |
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 |
