mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-31 21:11:44 +02:00
feat: not found topics
This commit is contained in:
committed by
Kamran Ahmed
parent
12ae7de3c5
commit
485ffcf755
@@ -67,16 +67,15 @@ if (isTopic) {
|
||||
nodeId,
|
||||
});
|
||||
|
||||
if (!topic) {
|
||||
Astro.response.status = 404;
|
||||
Astro.response.statusText = 'Not found';
|
||||
|
||||
return Astro.rewrite('/404');
|
||||
if (topic) {
|
||||
const md = MarkdownIt();
|
||||
htmlContent = await md.renderAsync(
|
||||
prepareOfficialRoadmapTopicContent(topic),
|
||||
);
|
||||
} else {
|
||||
htmlContent = '<h1>Not found</h1>';
|
||||
}
|
||||
|
||||
const md = MarkdownIt();
|
||||
htmlContent = await md.renderAsync(prepareOfficialRoadmapTopicContent(topic));
|
||||
|
||||
const fileWithoutBasePath = contentPath.replace(
|
||||
/.+?\/src\/data/,
|
||||
'/src/data',
|
||||
|
Reference in New Issue
Block a user