mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed empty tags key in front matter breaking search
This commit is contained in:
parent
0f1ca777e2
commit
4d117e5725
@ -45,7 +45,7 @@ class SearchIndex(BaseIndex):
|
|||||||
entry = self._entries[index]
|
entry = self._entries[index]
|
||||||
|
|
||||||
# Add document tags
|
# Add document tags
|
||||||
if "tags" in page.meta:
|
if page.meta.get("tags"):
|
||||||
entry["tags"] = page.meta["tags"]
|
entry["tags"] = page.meta["tags"]
|
||||||
|
|
||||||
# Add document boost for search
|
# Add document boost for search
|
||||||
|
@ -45,7 +45,7 @@ class SearchIndex(BaseIndex):
|
|||||||
entry = self._entries[index]
|
entry = self._entries[index]
|
||||||
|
|
||||||
# Add document tags
|
# Add document tags
|
||||||
if "tags" in page.meta:
|
if page.meta.get("tags"):
|
||||||
entry["tags"] = page.meta["tags"]
|
entry["tags"] = page.meta["tags"]
|
||||||
|
|
||||||
# Add document boost for search
|
# Add document boost for search
|
||||||
|
Loading…
Reference in New Issue
Block a user