Compare commits

...

1 Commits

Author SHA1 Message Date
Arik Chakma
1c80f22a54 feat: not found topics 2025-08-22 10:38:23 +06:00

View File

@@ -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',