Fixed search plugin crashing on page titles

This commit is contained in:
squidfunk 2023-01-03 10:46:41 +01:00
parent d0d6f19db8
commit 4548afb37a
2 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ class SearchIndex:
# if a page title was set via front matter, use that even though a h1
# might be given or the page name was specified in nav in mkdocs.yml
if not section.title:
section.title = page.meta.get("title", page.title)
section.title = [str(page.meta.get("title", page.title))]
# Compute title and text
title = "".join(section.title).strip()

View File

@ -161,7 +161,7 @@ class SearchIndex:
# if a page title was set via front matter, use that even though a h1
# might be given or the page name was specified in nav in mkdocs.yml
if not section.title:
section.title = page.meta.get("title", page.title)
section.title = [str(page.meta.get("title", page.title))]
# Compute title and text
title = "".join(section.title).strip()