From 2af74ec2fcde9693192bd9972e840f42fd1681b4 Mon Sep 17 00:00:00 2001 From: Andrew Jiang Date: Mon, 17 Jun 2024 15:26:16 -0400 Subject: [PATCH] fix: tabsV2 tab slug (#1032) --- pnpm-lock.yaml | 4 ---- .../algolia/AlgoliaSearchRecordGenerator.ts | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 91e01d8732..18488e5dd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -832,10 +832,6 @@ importers: specifier: ^1.5.0 version: 1.6.0(@types/node@18.19.33) - packages/fdr-sdk/dist/cjs: {} - - packages/fdr-sdk/dist/mjs: {} - packages/healthchecks: devDependencies: '@fern-api/fdr-sdk': diff --git a/servers/fdr/src/services/algolia/AlgoliaSearchRecordGenerator.ts b/servers/fdr/src/services/algolia/AlgoliaSearchRecordGenerator.ts index ab4ced19fa..92fc85ff3e 100644 --- a/servers/fdr/src/services/algolia/AlgoliaSearchRecordGenerator.ts +++ b/servers/fdr/src/services/algolia/AlgoliaSearchRecordGenerator.ts @@ -114,10 +114,23 @@ export class AlgoliaSearchRecordGenerator { switch (tab.type) { case "group": return tab.items.flatMap((item) => - this.generateAlgoliaSearchRecordsForNavigationItem(item, context), + this.generateAlgoliaSearchRecordsForNavigationItem( + item, + context.withPathPart({ + name: tab.title, + urlSlug: tab.urlSlug, + skipUrlSlug: tab.skipUrlSlug, + }), + ), ); case "changelog": - return this.generateAlgoliaSearchRecordsForChangelogSection(tab, context); + return this.generateAlgoliaSearchRecordsForChangelogSection( + tab, + context.withPathPart({ + name: tab.title ?? "Changelog", + urlSlug: tab.urlSlug, + }), + ); default: return []; }