Rename content path to landing path

pull/1657/head
Kamran Ahmed 3 years ago
parent 6dbd6de699
commit f986d9e170
  1. 18
      content/roadmaps.json
  2. 2
      content/roadmaps/103-react/meta.json
  3. 2
      content/roadmaps/104-angular/meta.json
  4. 2
      content/roadmaps/105-android/meta.json
  5. 2
      content/roadmaps/106-python/meta.json
  6. 2
      content/roadmaps/107-golang/meta.json
  7. 2
      content/roadmaps/108-java/meta.json
  8. 2
      content/roadmaps/109-postgresql-dba/meta.json
  9. 2
      content/roadmaps/110-aws/meta.json
  10. 2
      content/roadmaps/111-qa/meta.json
  11. 2
      lib/roadmap.ts
  12. 8
      pages/[roadmap]/index.tsx
  13. 28
      public/sitemap.xml
  14. 8
      scripts/roadmaps-meta.js

@ -155,7 +155,7 @@
"isTextHeavy": false, "isTextHeavy": false,
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"contentPath": "/roadmaps/103-react/landscape.md", "landingPath": "/roadmaps/103-react/landscape.md",
"resourcesPath": "/roadmaps/103-react/resources.md", "resourcesPath": "/roadmaps/103-react/resources.md",
"versions": [ "versions": [
"latest", "latest",
@ -196,7 +196,7 @@
"isTextHeavy": false, "isTextHeavy": false,
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"contentPath": "/roadmaps/104-angular/landscape.md", "landingPath": "/roadmaps/104-angular/landscape.md",
"resourcesPath": "/roadmaps/104-angular/resources.md", "resourcesPath": "/roadmaps/104-angular/resources.md",
"versions": [ "versions": [
"latest", "latest",
@ -237,7 +237,7 @@
"isTextHeavy": true, "isTextHeavy": true,
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"contentPath": "/roadmaps/105-android/landscape.md", "landingPath": "/roadmaps/105-android/landscape.md",
"resourcesPath": "/roadmaps/105-android/resources.md", "resourcesPath": "/roadmaps/105-android/resources.md",
"versions": [ "versions": [
"latest", "latest",
@ -278,7 +278,7 @@
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"resourcesPath": "/roadmaps/106-python/resources.md", "resourcesPath": "/roadmaps/106-python/resources.md",
"contentPath": "/roadmaps/106-python/landscape.md", "landingPath": "/roadmaps/106-python/landscape.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/python-roadmap", "pdfUrl": "https://kamranahmedse.gumroad.com/l/python-roadmap",
"versions": [ "versions": [
"latest" "latest"
@ -327,7 +327,7 @@
"isCommunity": false, "isCommunity": false,
"isUpcoming": false, "isUpcoming": false,
"featured": true, "featured": true,
"contentPath": "/roadmaps/107-golang/landscape.md", "landingPath": "/roadmaps/107-golang/landscape.md",
"resourcesPath": "/roadmaps/107-golang/resources.md", "resourcesPath": "/roadmaps/107-golang/resources.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/go-roadmap", "pdfUrl": "https://kamranahmedse.gumroad.com/l/go-roadmap",
"versions": [ "versions": [
@ -377,7 +377,7 @@
"isCommunity": false, "isCommunity": false,
"isUpcoming": false, "isUpcoming": false,
"featured": true, "featured": true,
"contentPath": "/roadmaps/108-java/landscape.md", "landingPath": "/roadmaps/108-java/landscape.md",
"resourcesPath": "/roadmaps/108-java/resources.md", "resourcesPath": "/roadmaps/108-java/resources.md",
"versions": [ "versions": [
"latest", "latest",
@ -421,7 +421,7 @@
"description": "Step by step guide to becoming a modern PostgreSQL DB Administrator in 2021", "description": "Step by step guide to becoming a modern PostgreSQL DB Administrator in 2021",
"featuredTitle": "DBA", "featuredTitle": "DBA",
"featuredDescription": "Step by step guide to become a PostgreSQL DBA in 2021", "featuredDescription": "Step by step guide to become a PostgreSQL DBA in 2021",
"contentPath": "/roadmaps/109-postgresql-dba/landscape.md", "landingPath": "/roadmaps/109-postgresql-dba/landscape.md",
"resourcesPath": "/roadmaps/109-postgresql-dba/resources.md", "resourcesPath": "/roadmaps/109-postgresql-dba/resources.md",
"author": { "author": {
"name": "Alexey Lesovsky", "name": "Alexey Lesovsky",
@ -460,7 +460,7 @@
"isCommunity": false, "isCommunity": false,
"isUpcoming": true, "isUpcoming": true,
"featured": true, "featured": true,
"contentPath": "/roadmaps/110-aws/landscape.md", "landingPath": "/roadmaps/110-aws/landscape.md",
"resourcesPath": "/roadmaps/110-aws/resources.md", "resourcesPath": "/roadmaps/110-aws/resources.md",
"versions": [ "versions": [
"latest", "latest",
@ -499,7 +499,7 @@
"featuredDescription": "Step by step guide to becoming a modern QA Engineer in 2021", "featuredDescription": "Step by step guide to becoming a modern QA Engineer in 2021",
"isUpcoming": true, "isUpcoming": true,
"featured": true, "featured": true,
"contentPath": "/roadmaps/111-qa/landscape.md", "landingPath": "/roadmaps/111-qa/landscape.md",
"resourcesPath": "/roadmaps/111-qa/resources.md", "resourcesPath": "/roadmaps/111-qa/resources.md",
"author": { "author": {
"name": "Anas Fitiani", "name": "Anas Fitiani",

@ -23,7 +23,7 @@
"isTextHeavy": false, "isTextHeavy": false,
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"versions": [ "versions": [
"latest", "latest",

@ -23,7 +23,7 @@
"isTextHeavy": false, "isTextHeavy": false,
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"versions": [ "versions": [
"latest", "latest",

@ -23,7 +23,7 @@
"isTextHeavy": true, "isTextHeavy": true,
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"versions": [ "versions": [
"latest", "latest",

@ -24,7 +24,7 @@
"isCommunity": false, "isCommunity": false,
"featured": true, "featured": true,
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/python-roadmap", "pdfUrl": "https://kamranahmedse.gumroad.com/l/python-roadmap",
"versions": [ "versions": [
"latest" "latest"

@ -34,7 +34,7 @@
"isCommunity": false, "isCommunity": false,
"isUpcoming": false, "isUpcoming": false,
"featured": true, "featured": true,
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/go-roadmap", "pdfUrl": "https://kamranahmedse.gumroad.com/l/go-roadmap",
"versions": [ "versions": [

@ -33,7 +33,7 @@
"isCommunity": false, "isCommunity": false,
"isUpcoming": false, "isUpcoming": false,
"featured": true, "featured": true,
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"versions": [ "versions": [
"latest", "latest",

@ -27,7 +27,7 @@
"description": "Step by step guide to becoming a modern PostgreSQL DB Administrator in 2021", "description": "Step by step guide to becoming a modern PostgreSQL DB Administrator in 2021",
"featuredTitle": "DBA", "featuredTitle": "DBA",
"featuredDescription": "Step by step guide to become a PostgreSQL DBA in 2021", "featuredDescription": "Step by step guide to become a PostgreSQL DBA in 2021",
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"author": { "author": {
"name": "Alexey Lesovsky", "name": "Alexey Lesovsky",

@ -22,7 +22,7 @@
"isCommunity": false, "isCommunity": false,
"isUpcoming": true, "isUpcoming": true,
"featured": true, "featured": true,
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"versions": [ "versions": [
"latest", "latest",

@ -23,7 +23,7 @@
"featuredDescription": "Step by step guide to becoming a modern QA Engineer in 2021", "featuredDescription": "Step by step guide to becoming a modern QA Engineer in 2021",
"isUpcoming": true, "isUpcoming": true,
"featured": true, "featured": true,
"contentPath": "./landscape.md", "landingPath": "./landscape.md",
"resourcesPath": "./resources.md", "resourcesPath": "./resources.md",
"author": { "author": {
"name": "Anas Fitiani", "name": "Anas Fitiani",

@ -16,7 +16,7 @@ export type RoadmapType = {
}, },
featured: boolean, featured: boolean,
imagePath?: string, imagePath?: string,
contentPath?: string; landingPath?: string;
resourcesPath: string; resourcesPath: string;
metaPath: string; metaPath: string;
isCommunity: boolean; isCommunity: boolean;

@ -33,18 +33,18 @@ function ImageRoadmap(props: RoadmapProps) {
function TextualRoadmap(props: RoadmapProps) { function TextualRoadmap(props: RoadmapProps) {
const { roadmap } = props; const { roadmap } = props;
if (!roadmap.contentPath) { if (!roadmap.landingPath) {
return null; return null;
} }
// Remove trailing slashes // Remove trailing slashes
const normalizedPath = roadmap.contentPath.replace(/^\//, ''); const normalizedPath = roadmap.landingPath.replace(/^\//, '');
const RoadmapContent = require(`../../content/${normalizedPath}`).default; const LandingContent = require(`../../content/${normalizedPath}`).default;
return ( return (
<Container maxW={'container.md'} position='relative'> <Container maxW={'container.md'} position='relative'>
<MdRenderer> <MdRenderer>
<RoadmapContent /> <LandingContent />
</MdRenderer> </MdRenderer>
</Container> </Container>
); );

@ -3,73 +3,73 @@
<url> <url>
<loc>https://roadmap.sh/frontend</loc> <loc>https://roadmap.sh/frontend</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.708Z</lastmod> <lastmod>2021-11-27T18:10:50.401Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/backend</loc> <loc>https://roadmap.sh/backend</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.708Z</lastmod> <lastmod>2021-11-27T18:10:50.403Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/devops</loc> <loc>https://roadmap.sh/devops</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.709Z</lastmod> <lastmod>2021-11-27T18:10:50.403Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/react</loc> <loc>https://roadmap.sh/react</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.709Z</lastmod> <lastmod>2021-12-03T13:12:58.607Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/angular</loc> <loc>https://roadmap.sh/angular</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-29T15:27:47.590Z</lastmod> <lastmod>2021-12-03T13:12:58.593Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/android</loc> <loc>https://roadmap.sh/android</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:14:34.276Z</lastmod> <lastmod>2021-12-03T13:12:58.614Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/python</loc> <loc>https://roadmap.sh/python</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:14:34.274Z</lastmod> <lastmod>2021-12-03T13:12:58.595Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/golang</loc> <loc>https://roadmap.sh/golang</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:20:55.096Z</lastmod> <lastmod>2021-12-03T13:12:58.591Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/java</loc> <loc>https://roadmap.sh/java</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-10-24T10:30:18.378Z</lastmod> <lastmod>2021-12-03T13:12:58.610Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/postgresql-dba</loc> <loc>https://roadmap.sh/postgresql-dba</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:14:34.272Z</lastmod> <lastmod>2021-12-03T13:12:58.599Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/aws</loc> <loc>https://roadmap.sh/aws</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-09-22T12:34:39.639Z</lastmod> <lastmod>2021-12-03T13:12:58.597Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://roadmap.sh/qa</loc> <loc>https://roadmap.sh/qa</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-11-03T19:30:14.028Z</lastmod> <lastmod>2021-12-03T13:12:58.589Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
@ -255,7 +255,7 @@
<url> <url>
<loc>https://roadmap.sh/</loc> <loc>https://roadmap.sh/</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-11-22T16:05:46.441Z</lastmod> <lastmod>2021-11-27T11:45:44.569Z</lastmod>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
@ -273,7 +273,7 @@
<url> <url>
<loc>https://roadmap.sh/thanks</loc> <loc>https://roadmap.sh/thanks</loc>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<lastmod>2021-11-19T12:59:26.864Z</lastmod> <lastmod>2021-11-30T15:46:40.893Z</lastmod>
<priority>0.5</priority> <priority>0.5</priority>
</url> </url>
<url> <url>

@ -15,9 +15,9 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
// We can't use the absolute path in the build e.g. ~/Users/user/where-build-is-running/content // We can't use the absolute path in the build e.g. ~/Users/user/where-build-is-running/content
// So, we remove it and use the path relative to content directory // So, we remove it and use the path relative to content directory
let contentPath = roadmapMeta.contentPath; let landingPath = roadmapMeta.landingPath;
if (contentPath) { if (landingPath) {
contentPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), roadmapMeta.contentPath); landingPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), roadmapMeta.landingPath);
} }
let resourcesPath = roadmapMeta.resourcesPath; let resourcesPath = roadmapMeta.resourcesPath;
@ -36,7 +36,7 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
{ {
...roadmapMeta, ...roadmapMeta,
id: roadmapSlug, id: roadmapSlug,
contentPath: contentPath, landingPath: landingPath,
resourcesPath: resourcesPath, resourcesPath: resourcesPath,
metaPath: metaPath, metaPath: metaPath,
isUpcoming: roadmapMeta.isUpcoming || false isUpcoming: roadmapMeta.isUpcoming || false

Loading…
Cancel
Save