diff --git a/src/pages/[roadmapId]/[...topicId].astro b/src/pages/[roadmapId]/[...topicId].astro index 31baf3537..3450c0efe 100644 --- a/src/pages/[roadmapId]/[...topicId].astro +++ b/src/pages/[roadmapId]/[...topicId].astro @@ -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 = '

Not found

'; } - const md = MarkdownIt(); - htmlContent = await md.renderAsync(prepareOfficialRoadmapTopicContent(topic)); - const fileWithoutBasePath = contentPath.replace( /.+?\/src\/data/, '/src/data',