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:
committed by
Kamran Ahmed
parent
93c1ea0496
commit
179cefe4da
@@ -44,7 +44,6 @@ export interface OfficialRoadmapTopicContentDocument {
|
|||||||
_id?: string;
|
_id?: string;
|
||||||
roadmapSlug: string;
|
roadmapSlug: string;
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
title: string;
|
|
||||||
description: string;
|
description: string;
|
||||||
resources: OfficialRoadmapTopicResource[];
|
resources: OfficialRoadmapTopicResource[];
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import fs from 'node:fs/promises';
|
import fs from 'node:fs/promises';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { slugify } from '../src/lib/slugger';
|
|
||||||
import type { OfficialRoadmapDocument } from '../src/queries/official-roadmap';
|
import type { OfficialRoadmapDocument } from '../src/queries/official-roadmap';
|
||||||
import { parse } from 'node-html-parser';
|
import { parse } from 'node-html-parser';
|
||||||
import { markdownToHtml } from '../src/lib/markdown';
|
import { markdownToHtml } from '../src/lib/markdown';
|
||||||
@@ -192,9 +191,8 @@ try {
|
|||||||
const htmlStringWithoutLinks = rootHtml.toString();
|
const htmlStringWithoutLinks = rootHtml.toString();
|
||||||
const description = htmlToMarkdown(htmlStringWithoutLinks);
|
const description = htmlToMarkdown(htmlStringWithoutLinks);
|
||||||
|
|
||||||
const updatedDescription = `# ${title?.textContent}
|
const updatedDescription =
|
||||||
|
`# ${title?.textContent}\n\n${description}`.trim();
|
||||||
${description}`.trim();
|
|
||||||
|
|
||||||
const label = node?.data?.label as string;
|
const label = node?.data?.label as string;
|
||||||
if (!label) {
|
if (!label) {
|
||||||
@@ -205,7 +203,6 @@ ${description}`.trim();
|
|||||||
topics.push({
|
topics.push({
|
||||||
roadmapSlug,
|
roadmapSlug,
|
||||||
nodeId,
|
nodeId,
|
||||||
title: label,
|
|
||||||
description: updatedDescription,
|
description: updatedDescription,
|
||||||
resources: listLinks,
|
resources: listLinks,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user