Remove topic pages and upcoming roadmaps from index

astro
Kamran Ahmed 2 years ago
parent d1445d6c7c
commit 9dbb2d05c9
  1. 3
      src/layouts/BaseLayout.astro
  2. 2
      src/pages/[...topicId].astro
  3. 1
      src/pages/[roadmapId]/index.astro

@ -12,6 +12,7 @@ export interface Props {
title: string;
description?: string;
keywords?: string[];
noIndex?: boolean;
sponsor?: SponsorType;
}
@ -19,6 +20,7 @@ const {
title = siteConfig.title,
description = siteConfig.description,
keywords = siteConfig.keywords,
noIndex = false,
sponsor,
} = Astro.props;
---
@ -32,6 +34,7 @@ const {
<meta name='description' content={description} />
<meta name='author' content='Kamran Ahmed' />
<meta name='keywords' content={keywords.join(', ')} />
{noIndex && <meta name='robots' content='noindex' />}
<meta
name='viewport'
content='width=device-width, user-scalable=yes, initial-scale=1.0, maximum-scale=3.0, minimum-scale=1.0'

@ -18,7 +18,7 @@ const { topicId } = Astro.params;
const { file, breadcrumbs, roadmapId, roadmap, heading } = Astro.props as TopicFileType;
---
<BaseLayout title={`${heading} - roadmap.sh`} description={`Free resources to learn ${heading} in ${roadmap.featuredTitle}. Everything you need to know about ${heading} and how it realtes to ${roadmap.featuredTitle}.`}>
<BaseLayout title={`${heading} - roadmap.sh`} description={`Free resources to learn ${heading} in ${roadmap.featuredTitle}. Everything you need to know about ${heading} and how it realtes to ${roadmap.featuredTitle}.`} noIndex={true}>
<RoadmapBanner roadmapId={roadmapId} roadmap={roadmap} />
<div class="bg-gray-50">
<Breadcrumbs breadcrumbs={breadcrumbs} roadmapId={roadmapId} />

@ -27,6 +27,7 @@ const roadmapData = roadmapFile.frontmatter as RoadmapFrontmatter;
description={roadmapData.seo.description}
keywords={roadmapData.seo.keywords}
sponsor={roadmapData.sponsor}
noIndex={roadmapData.isUpcoming}
>
<RoadmapHeader
description={roadmapData.description}

Loading…
Cancel
Save