From 179cefe4daf425928717537b1ff030853a56ca19 Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Wed, 20 Aug 2025 19:34:41 +0600 Subject: [PATCH] fix: remove title --- scripts/sync-content-to-repo.ts | 1 - scripts/sync-repo-to-database.ts | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/sync-content-to-repo.ts b/scripts/sync-content-to-repo.ts index a9bfb2c55..4a757de7e 100644 --- a/scripts/sync-content-to-repo.ts +++ b/scripts/sync-content-to-repo.ts @@ -44,7 +44,6 @@ export interface OfficialRoadmapTopicContentDocument { _id?: string; roadmapSlug: string; nodeId: string; - title: string; description: string; resources: OfficialRoadmapTopicResource[]; createdAt: Date; diff --git a/scripts/sync-repo-to-database.ts b/scripts/sync-repo-to-database.ts index b5c4f2eaa..147cf1901 100644 --- a/scripts/sync-repo-to-database.ts +++ b/scripts/sync-repo-to-database.ts @@ -1,7 +1,6 @@ import fs from 'node:fs/promises'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { slugify } from '../src/lib/slugger'; import type { OfficialRoadmapDocument } from '../src/queries/official-roadmap'; import { parse } from 'node-html-parser'; import { markdownToHtml } from '../src/lib/markdown'; @@ -192,9 +191,8 @@ try { const htmlStringWithoutLinks = rootHtml.toString(); const description = htmlToMarkdown(htmlStringWithoutLinks); - const updatedDescription = `# ${title?.textContent} - -${description}`.trim(); + const updatedDescription = + `# ${title?.textContent}\n\n${description}`.trim(); const label = node?.data?.label as string; if (!label) { @@ -205,7 +203,6 @@ ${description}`.trim(); topics.push({ roadmapSlug, nodeId, - title: label, description: updatedDescription, resources: listLinks, });