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; title: string;
description?: string; description?: string;
keywords?: string[]; keywords?: string[];
noIndex?: boolean;
sponsor?: SponsorType; sponsor?: SponsorType;
} }
@ -19,6 +20,7 @@ const {
title = siteConfig.title, title = siteConfig.title,
description = siteConfig.description, description = siteConfig.description,
keywords = siteConfig.keywords, keywords = siteConfig.keywords,
noIndex = false,
sponsor, sponsor,
} = Astro.props; } = Astro.props;
--- ---
@ -32,6 +34,7 @@ const {
<meta name='description' content={description} /> <meta name='description' content={description} />
<meta name='author' content='Kamran Ahmed' /> <meta name='author' content='Kamran Ahmed' />
<meta name='keywords' content={keywords.join(', ')} /> <meta name='keywords' content={keywords.join(', ')} />
{noIndex && <meta name='robots' content='noindex' />}
<meta <meta
name='viewport' name='viewport'
content='width=device-width, user-scalable=yes, initial-scale=1.0, maximum-scale=3.0, minimum-scale=1.0' 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; 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} /> <RoadmapBanner roadmapId={roadmapId} roadmap={roadmap} />
<div class="bg-gray-50"> <div class="bg-gray-50">
<Breadcrumbs breadcrumbs={breadcrumbs} roadmapId={roadmapId} /> <Breadcrumbs breadcrumbs={breadcrumbs} roadmapId={roadmapId} />

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

Loading…
Cancel
Save