From a2f4804e08f3e1449ecc9d79512b10e07aa9f6e5 Mon Sep 17 00:00:00 2001 From: dslovinsky Date: Wed, 14 Jan 2026 22:52:15 -0800 Subject: [PATCH] fix: restore format for changelog pathIndex entries --- src/content-indexer/indexers/changelog.ts | 13 +++++++------ src/content-indexer/types/pathIndex.ts | 8 +++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/content-indexer/indexers/changelog.ts b/src/content-indexer/indexers/changelog.ts index b4e173786..d6a835de9 100644 --- a/src/content-indexer/indexers/changelog.ts +++ b/src/content-indexer/indexers/changelog.ts @@ -3,7 +3,10 @@ import path from "path"; import type { AlgoliaRecord } from "@/content-indexer/types/algolia.ts"; import type { IndexerResult } from "@/content-indexer/types/indexer.ts"; -import type { PathIndex } from "@/content-indexer/types/pathIndex.ts"; +import type { + ChangelogPathIndexEntry, + PathIndex, +} from "@/content-indexer/types/pathIndex.ts"; import { readLocalFile } from "@/content-indexer/utils/filesystem.ts"; import { truncateRecord } from "@/content-indexer/utils/truncate-record.ts"; @@ -85,11 +88,9 @@ export const buildChangelogIndex = async ( const route = `${year}/${Number(month)}/${Number(day)}`; // Create path index entry - const pathIndexEntry = { - type: "mdx" as const, - filePath: `fern/changelog/${filename}`, - source: "changelog" as const, - tab: "changelog", + const pathIndexEntry: ChangelogPathIndexEntry = { + date, // ISO date string like "2025-12-11" + filePath: filename, // Filename like "2025-12-11.md" }; // Create Algolia record diff --git a/src/content-indexer/types/pathIndex.ts b/src/content-indexer/types/pathIndex.ts index e02aa4f5d..830a7a08b 100644 --- a/src/content-indexer/types/pathIndex.ts +++ b/src/content-indexer/types/pathIndex.ts @@ -21,9 +21,15 @@ export interface OpenApiPathIndexEntry { tab: string; } +export interface ChangelogPathIndexEntry { + date: string; // ISO date string like "2025-12-11" + filePath: string; // Filename like "2025-12-11.md" +} + export type PathIndexEntry = | MdxPathIndexEntry | OpenRpcPathIndexEntry - | OpenApiPathIndexEntry; + | OpenApiPathIndexEntry + | ChangelogPathIndexEntry; export type PathIndex = Record;