diff --git a/components/roadmap/roadmap-error.tsx b/components/roadmap/roadmap-error.tsx index be26e35f1..532a630c6 100644 --- a/components/roadmap/roadmap-error.tsx +++ b/components/roadmap/roadmap-error.tsx @@ -19,7 +19,7 @@ export function RoadmapError(props: RoadmapProps) { rounded='5px' color='white' > - Oops! There's an error + Oops! There's an error Try refreshing or report a bug and use the non-interactive version ); diff --git a/content/roadmaps.json b/content/roadmaps.json index 5c98e244f..46699ac5a 100644 --- a/content/roadmaps.json +++ b/content/roadmaps.json @@ -13,6 +13,7 @@ "javascript developer", "frontend development skills", "frontend development skills test", + "frontend roadmap", "frontend engineer roadmap", "frontend developer roadmap", "become a frontend developer", @@ -37,6 +38,7 @@ }, "featured": true, "imagePath": "/roadmaps/frontend.png", + "jsonUrl": "/project/frontend.json", "resourcesPath": "/roadmaps/100-frontend/resources.md", "pdfUrl": "https://kamranahmedse.gumroad.com/l/frontend-roadmap", "contentPathsFilePath": "/roadmaps/100-frontend/content-paths.json", diff --git a/content/roadmaps/100-frontend/meta.json b/content/roadmaps/100-frontend/meta.json index 49f55bfbc..faab73026 100644 --- a/content/roadmaps/100-frontend/meta.json +++ b/content/roadmaps/100-frontend/meta.json @@ -12,6 +12,7 @@ "javascript developer", "frontend development skills", "frontend development skills test", + "frontend roadmap", "frontend engineer roadmap", "frontend developer roadmap", "become a frontend developer", @@ -36,7 +37,8 @@ }, "featured": true, "imagePath": "/roadmaps/frontend.png", + "jsonUrl": "/project/frontend.json", "resourcesPath": "./resources.md", "pdfUrl": "https://kamranahmedse.gumroad.com/l/frontend-roadmap", "contentPathsFilePath": "./content-paths.json" -} \ No newline at end of file +} diff --git a/content/roadmaps/101-backend/meta.json b/content/roadmaps/101-backend/meta.json index 076cd855e..949e453ef 100644 --- a/content/roadmaps/101-backend/meta.json +++ b/content/roadmaps/101-backend/meta.json @@ -5,6 +5,7 @@ "keywords": [ "guide to becoming a developer", "guide to becoming a backend developer", + "backend roadmap", "backend developer", "backend engineer", "backend skills", @@ -31,7 +32,8 @@ "featuredTitle": "Backend", "featuredDescription": "Step by step guide to becoming a backend developer in 2021", "featured": true, - "imagePath": "/roadmaps/backend.png", + "imageUrl": "/roadmaps/backend.png", + "jsonUrl": "/project/frontend.json", "resourcesPath": "./resources.md", "author": { "name": "Kamran Ahmed", diff --git a/content/roadmaps/102-devops/meta.json b/content/roadmaps/102-devops/meta.json index 238876eea..5f827e099 100644 --- a/content/roadmaps/102-devops/meta.json +++ b/content/roadmaps/102-devops/meta.json @@ -25,7 +25,8 @@ "featuredTitle": "DevOps", "featuredDescription": "Step by step guide for DevOps or operations role in 2021", "featured": true, - "imagePath": "/roadmaps/devops.png", + "imageUrl": "/roadmaps/devops.png", + "jsonUrl": "/project/devops.json", "resourcesPath": "./resources.md", "versions": [ "latest", diff --git a/content/roadmaps/103-react/meta.json b/content/roadmaps/103-react/meta.json index c64f68ed3..c8281ea75 100644 --- a/content/roadmaps/103-react/meta.json +++ b/content/roadmaps/103-react/meta.json @@ -25,6 +25,7 @@ "featured": true, "landingPath": "./landscape.md", "resourcesPath": "./resources.md", + "jsonUrl": "/project/react.json", "versions": [ "latest", "2018", diff --git a/content/roadmaps/104-angular/meta.json b/content/roadmaps/104-angular/meta.json index 28742b30d..8a2023a15 100644 --- a/content/roadmaps/104-angular/meta.json +++ b/content/roadmaps/104-angular/meta.json @@ -23,6 +23,7 @@ "isTextHeavy": false, "isCommunity": false, "featured": true, + "jsonUrl": "/project/angular.json", "landingPath": "./landscape.md", "resourcesPath": "./resources.md", "versions": [ diff --git a/content/roadmaps/105-android/meta.json b/content/roadmaps/105-android/meta.json index 32e041831..04c0eece5 100644 --- a/content/roadmaps/105-android/meta.json +++ b/content/roadmaps/105-android/meta.json @@ -23,6 +23,7 @@ "isTextHeavy": true, "isCommunity": false, "featured": true, + "jsonUrl": "/project/android.json", "landingPath": "./landscape.md", "resourcesPath": "./resources.md", "versions": [ diff --git a/content/roadmaps/106-python/meta.json b/content/roadmaps/106-python/meta.json index 960c8779b..5da02b579 100644 --- a/content/roadmaps/106-python/meta.json +++ b/content/roadmaps/106-python/meta.json @@ -23,6 +23,7 @@ "isTextHeavy": true, "isCommunity": false, "featured": true, + "jsonUrl": "/project/python.json", "resourcesPath": "./resources.md", "landingPath": "./landscape.md", "pdfUrl": "https://kamranahmedse.gumroad.com/l/python-roadmap", diff --git a/content/roadmaps/107-golang/meta.json b/content/roadmaps/107-golang/meta.json index 07598618e..593224935 100644 --- a/content/roadmaps/107-golang/meta.json +++ b/content/roadmaps/107-golang/meta.json @@ -34,6 +34,7 @@ "isCommunity": false, "isUpcoming": false, "featured": true, + "jsonUrl": "/project/golang.json", "landingPath": "./landscape.md", "resourcesPath": "./resources.md", "pdfUrl": "https://kamranahmedse.gumroad.com/l/go-roadmap", diff --git a/content/roadmaps/108-java/meta.json b/content/roadmaps/108-java/meta.json index c0f88323a..f2a84bba6 100644 --- a/content/roadmaps/108-java/meta.json +++ b/content/roadmaps/108-java/meta.json @@ -33,6 +33,7 @@ "isCommunity": false, "isUpcoming": false, "featured": true, + "jsonUrl": "/project/java.json", "landingPath": "./landscape.md", "resourcesPath": "./resources.md", "versions": [ diff --git a/lib/roadmap.ts b/lib/roadmap.ts index cd698e68e..6f89bc5a5 100644 --- a/lib/roadmap.ts +++ b/lib/roadmap.ts @@ -4,18 +4,19 @@ export type RoadmapType = { seo: { title: string; description: string; - keywords: string[] - }, - title: string, - description: string, + keywords: string[]; + }; + title: string; + description: string; featuredTitle: string; - featuredDescription: string, + featuredDescription: string; author: { - name: string, - url: string - }, - featured: boolean, - imagePath?: string, + name: string; + url: string; + }; + featured: boolean; + imageUrl?: string; + jsonUrl?: string; landingPath?: string; resourcesPath: string; contentPathsFilePath?: string; @@ -27,15 +28,15 @@ export type RoadmapType = { }; export function getRoadmapById(id: string): RoadmapType | undefined { - return (roadmaps as RoadmapType[]).find(roadmap => roadmap.id === id); + return (roadmaps as RoadmapType[]).find((roadmap) => roadmap.id === id); } export function getAllRoadmaps(): RoadmapType[] { - return (roadmaps as RoadmapType[]); + return roadmaps as RoadmapType[]; } export function getFeaturedRoadmaps(): RoadmapType[] { const roadmaps: RoadmapType[] = getAllRoadmaps(); - return roadmaps.filter(roadmap => roadmap.featured); + return roadmaps.filter((roadmap) => roadmap.featured); } diff --git a/pages/[roadmap]/index.tsx b/pages/[roadmap]/index.tsx index 6c9a05266..3feadc784 100644 --- a/pages/[roadmap]/index.tsx +++ b/pages/[roadmap]/index.tsx @@ -15,14 +15,14 @@ type RoadmapProps = { function ImageRoadmap(props: RoadmapProps) { const { roadmap } = props; - if (!roadmap.imagePath) { + if (!roadmap.imageUrl) { return null; } return ( - {roadmap.title} + {roadmap.title} ); diff --git a/pages/[roadmap]/interactive.tsx b/pages/[roadmap]/interactive.tsx index 230772cd3..08170c4b2 100644 --- a/pages/[roadmap]/interactive.tsx +++ b/pages/[roadmap]/interactive.tsx @@ -30,7 +30,7 @@ function RoadmapRenderer(props: RoadmapProps) { const [hasErrorRendering, setHasErrorRendering] = useState(false); useEffect(() => { - get(`/project/${roadmap.id}.json`) + get(roadmap.jsonUrl) .then((roadmapJson) => { setRoadmapJson(roadmapJson); }) @@ -38,7 +38,7 @@ function RoadmapRenderer(props: RoadmapProps) { console.error(err); setHasErrorRendering(true); }); - }, [get, roadmap.id]); + }, [get, roadmap.id, roadmap.jsonUrl]); // Event bindings for the roadmap interactivity useEffect(() => { diff --git a/public/sitemap.xml b/public/sitemap.xml index 97e96ca0a..3503df2cd 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -3,7 +3,7 @@ https://roadmap.sh/frontend monthly - 2021-12-04T23:57:18.813Z + 2021-12-07T12:17:26.159Z 1.0 @@ -273,7 +273,7 @@ https://roadmap.sh/thanks monthly - 2021-11-30T15:46:40.893Z + 2021-12-06T14:21:37.276Z 0.5