diff --git a/components/helmet.tsx b/components/helmet.tsx
index e5302a340..c0dab3876 100644
--- a/components/helmet.tsx
+++ b/components/helmet.tsx
@@ -1,73 +1,163 @@
import NextHead from 'next/head';
import siteConfig from '../content/site.json';
+import { RoadmapType } from '../lib/roadmap';
+import { roadmapTheme } from '../styles/theme';
type HelmetProps = {
title?: string;
keywords?: string[];
canonical?: string;
description?: string;
+ roadmap?: RoadmapType;
};
-const Helmet = (props: HelmetProps) => (
-
-
+function getRichSnippetJson(roadmap: RoadmapType) {
+ return {
+ '@context': 'https://schema.org',
+ '@type': 'Article',
+ mainEntityOfPage: {
+ '@type': 'WebPage',
+ '@id': `https://roadmap.sh/${roadmap.id}`,
+ },
+ headline: roadmap.seo.title,
+ description: roadmap.seo.description,
+ image: roadmap.jsonUrl
+ ? `https://roadmap.sh/roadmaps/${roadmap.id}.png`
+ : undefined,
+ author: {
+ '@type': 'Person',
+ name: 'Kamran Ahmed',
+ url: 'https://twitter.com/kamranahmedse',
+ },
+ publisher: {
+ '@type': 'Organization',
+ name: 'roadmap.sh',
+ logo: {
+ '@type': 'ImageObject',
+ url: 'https://roadmap.sh/brand-square.png',
+ },
+ },
+ };
+}
- {props.title || siteConfig.title}
-
+const Helmet = (props: HelmetProps) => {
+ const { roadmap, title, canonical, description, keywords } = props;
-
-
+ return (
+
+
-
- {props.canonical && }
-
+ {title || siteConfig.title}
+
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+ {canonical && }
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
- { /* Global Site Tag (gtag.js) - Google Analytics */}
- {process.env.GA_SECRET && (
- <>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {roadmap?.id && (
+
+ )}
+
+ {/* Global Site Tag (gtag.js) - Google Analytics */}
+ {process.env.GA_SECRET && (
+ <>
+
+
- >
- )}
-
-
-);
+ `,
+ }}
+ />
+ >
+ )}
+
+ );
+};
export default Helmet;
diff --git a/content/roadmaps/100-frontend/meta.json b/content/roadmaps/100-frontend/meta.json
index af8c8ff84..fd83575da 100644
--- a/content/roadmaps/100-frontend/meta.json
+++ b/content/roadmaps/100-frontend/meta.json
@@ -1,7 +1,7 @@
{
"seo": {
- "title": "Learn to become a modern frontend developer",
- "description": "Community driven, articles, resources, guides, interview questions, quizzes for modern frontend development. Learn to become a modern frontend developer by following the steps, skills, resources and guides listed in this roadmap.",
+ "title": "Frontend Developer Roadmap: Learn to become a modern frontend developer",
+ "description": "Learn to become a modern frontend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern frontend development.",
"keywords": [
"guide to becoming a developer",
"guide to becoming a frontend developer",
diff --git a/content/roadmaps/101-backend/meta.json b/content/roadmaps/101-backend/meta.json
index 949e453ef..0c856166b 100644
--- a/content/roadmaps/101-backend/meta.json
+++ b/content/roadmaps/101-backend/meta.json
@@ -1,7 +1,7 @@
{
"seo": {
- "title": "Learn to become a modern backend developer",
- "description": "Community driven, articles, resources, guides, interview questions, quizzes for modern backend development. Learn to become a modern backend developer by following the steps, skills, resources and guides listed in this roadmap.",
+ "title": "Backend Developer Roadmap: Learn to become a modern backend developer",
+ "description": "Learn to become a modern backend developer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern backend development.",
"keywords": [
"guide to becoming a developer",
"guide to becoming a backend developer",
diff --git a/pages/[roadmap]/index.tsx b/pages/[roadmap]/index.tsx
index 03d3b22be..f844d1230 100644
--- a/pages/[roadmap]/index.tsx
+++ b/pages/[roadmap]/index.tsx
@@ -63,6 +63,7 @@ export default function Roadmap(props: RoadmapProps) {
title={roadmap?.seo?.title || roadmap.title}
description={roadmap?.seo?.description || roadmap.description}
keywords={roadmap?.seo.keywords || []}
+ roadmap={roadmap}
/>
diff --git a/public/roadmaps/android.png b/public/roadmaps/android.png
new file mode 100644
index 000000000..911cc560d
Binary files /dev/null and b/public/roadmaps/android.png differ