Skip to content

Commit 38f3aa1

Browse files
committed
[Docs Site] Trim product area suffix from titles in TroubleshootingList
1 parent 5a61168 commit 38f3aa1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/TroubleshootingList.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ const resources = await getCollection("docs", (entry) => {
5050
location.push(title);
5151
}
5252

53+
// Use the custom title from the `head` frontmatter, minus
54+
// the product area suffix, if present.
5355
const title =
54-
resource.data.head.find((x) => x.tag === "title")?.content ??
55-
resource.data.title;
56+
resource.data.head
57+
.find((x) => x.tag === "title")
58+
?.content.split(" · ")[0] ?? resource.data.title;
5659

5760
return (
5861
<tr>

0 commit comments

Comments
 (0)