Add handling of old roadmap images
@ -4,7 +4,7 @@
|
|||||||
"description": "Step by step guide to becoming a modern frontend developer",
|
"description": "Step by step guide to becoming a modern frontend developer",
|
||||||
"featuredDescription": "Step by step guide to becoming a modern frontend developer in 2019",
|
"featuredDescription": "Step by step guide to becoming a modern frontend developer in 2019",
|
||||||
"slug": "/roadmaps/frontend",
|
"slug": "/roadmaps/frontend",
|
||||||
"picture": "/static/roadmaps/frontend.png",
|
"picture": "/static/roadmaps/{version}/frontend.png",
|
||||||
"featured": true,
|
"featured": true,
|
||||||
"versions": [
|
"versions": [
|
||||||
"latest",
|
"latest",
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"description": "Step by step guide to becoming a modern backend developer",
|
"description": "Step by step guide to becoming a modern backend developer",
|
||||||
"featuredDescription": "Step by step guide to becoming a modern backend developer in 2019",
|
"featuredDescription": "Step by step guide to becoming a modern backend developer in 2019",
|
||||||
"slug": "/roadmaps/backend",
|
"slug": "/roadmaps/backend",
|
||||||
"picture": "/static/roadmaps/backend.png",
|
"picture": "/static/roadmaps/{version}/backend.png",
|
||||||
"featured": true,
|
"featured": true,
|
||||||
"versions": [
|
"versions": [
|
||||||
"latest",
|
"latest",
|
||||||
@ -30,7 +30,7 @@
|
|||||||
"description": "Step by step guide for DevOps or any other Operations Role",
|
"description": "Step by step guide for DevOps or any other Operations Role",
|
||||||
"featuredDescription": "Step by step guide to become an SRE or for any operations role in 2019",
|
"featuredDescription": "Step by step guide to become an SRE or for any operations role in 2019",
|
||||||
"slug": "/roadmaps/devops",
|
"slug": "/roadmaps/devops",
|
||||||
"picture": "/static/roadmaps/devops.png",
|
"picture": "/static/roadmaps/{version}/devops.png",
|
||||||
"featured": true,
|
"featured": true,
|
||||||
"versions": [
|
"versions": [
|
||||||
"latest",
|
"latest",
|
||||||
|
@ -19,8 +19,11 @@ export const getRequestedRoadmap = req => {
|
|||||||
legacyUrlWithoutVersion,
|
legacyUrlWithoutVersion,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const foundRoadmap = roadmaps.find(roadmap => urlToSlugList.includes(roadmap.slug)) || {};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...roadmaps.find(roadmap => urlToSlugList.includes(roadmap.slug)),
|
...foundRoadmap,
|
||||||
version: foundVersion,
|
version: foundVersion,
|
||||||
|
picture: (foundRoadmap.picture || '').replace('{version}', foundVersion),
|
||||||
};
|
};
|
||||||
};
|
};
|
Before Width: | Height: | Size: 965 KiB After Width: | Height: | Size: 965 KiB |
Before Width: | Height: | Size: 367 KiB After Width: | Height: | Size: 367 KiB |
Before Width: | Height: | Size: 625 KiB After Width: | Height: | Size: 625 KiB |
BIN
static/roadmaps/latest/backend.png
Normal file
After Width: | Height: | Size: 965 KiB |
BIN
static/roadmaps/latest/devops.png
Normal file
After Width: | Height: | Size: 367 KiB |
BIN
static/roadmaps/latest/frontend.png
Normal file
After Width: | Height: | Size: 625 KiB |