1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-28 11:39:52 +02:00

fix: remove title

This commit is contained in:
Arik Chakma
2025-08-20 19:34:41 +06:00
committed by Kamran Ahmed
parent 93c1ea0496
commit 179cefe4da
2 changed files with 2 additions and 6 deletions

View File

@@ -44,7 +44,6 @@ export interface OfficialRoadmapTopicContentDocument {
_id?: string;
roadmapSlug: string;
nodeId: string;
title: string;
description: string;
resources: OfficialRoadmapTopicResource[];
createdAt: Date;

View File

@@ -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,
});