diff --git a/src/components/TopicDetail/TopicDetail.tsx b/src/components/TopicDetail/TopicDetail.tsx index 2dfa984c4..968e27cf1 100644 --- a/src/components/TopicDetail/TopicDetail.tsx +++ b/src/components/TopicDetail/TopicDetail.tsx @@ -158,13 +158,7 @@ export function TopicDetail(props: TopicDetailProps) { } let topicHtml = ''; if (!isCustomResource) { - // It's full HTML with page body, head etc. - // We only need the inner HTML of the #main-content - const node = new DOMParser().parseFromString( - response as string, - 'text/html', - ); - topicHtml = node?.getElementById('main-content')?.outerHTML || ''; + topicHtml = response as string; } else { setLinks((response as RoadmapContentDocument)?.links || []); setTopicTitle((response as RoadmapContentDocument)?.title || ''); diff --git a/src/pages/[roadmapId]/[...topicId].astro b/src/pages/[roadmapId]/[...topicId].astro index 1edb3624f..d8094a560 100644 --- a/src/pages/[roadmapId]/[...topicId].astro +++ b/src/pages/[roadmapId]/[...topicId].astro @@ -24,40 +24,11 @@ export async function getStaticPaths() { }); } +export const partial = true; + const { topicId } = Astro.params; const { file, roadmapId, roadmap, heading } = Astro.props as RoadmapTopicFileType; - -const gitHubBaseUrl = - 'https://github.com/kamranahmedse/developer-roadmap/blob/master/src/data'; -const gitHubFullUrl = file.file.replace(/^.+\/src\/data/, `${gitHubBaseUrl}/`); -const gitHubRelativeUrl = file.file.replace(/^.+\/src\/data/, 'src/data'); --- - - - - - - - - - - Found any mistakes? Help us improve by updating the file here.. - - - - + \ No newline at end of file
- Found any mistakes? Help us improve by updating the file here.. -