Skip to content

Commit 7fe8ce1

Browse files
committed
fix breadcrumb construction
1 parent 51c0b5c commit 7fe8ce1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pcweb/components/docpage/navbar/typesense.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,9 @@ def _format_result(self, doc: dict, highlights: list = []) -> dict:
197197

198198
if doc.get("section") != "Blog":
199199

200-
path_parts = doc.get("path", "").replace(".md", "").split("/")
201-
parts = [part.replace("-", " ").replace("_", " ").title() for part in path_parts if part]
202-
203200
return {
204201
"name": doc.get("title", ""),
205-
"parts": parts,
202+
"parts": doc.get("parts", []),
206203
"url": doc.get("url", ""),
207204
"image": doc.get('path', ""),
208205
"cluster": self._get_cluster_from_section(doc.get("section", "")),

0 commit comments

Comments
 (0)