diff --git a/content/roadmaps.json b/content/roadmaps.json index 05bd32670..5c98e244f 100644 --- a/content/roadmaps.json +++ b/content/roadmaps.json @@ -39,7 +39,7 @@ "imagePath": "/roadmaps/frontend.png", "resourcesPath": "/roadmaps/100-frontend/resources.md", "pdfUrl": "https://kamranahmedse.gumroad.com/l/frontend-roadmap", - "contentPathsFilePath": "/100-frontend/content-paths.json", + "contentPathsFilePath": "/roadmaps/100-frontend/content-paths.json", "id": "frontend", "metaPath": "/roadmaps/100-frontend/meta.json", "isUpcoming": false diff --git a/content/roadmaps/100-frontend/meta.json b/content/roadmaps/100-frontend/meta.json index 5e684fb49..49f55bfbc 100644 --- a/content/roadmaps/100-frontend/meta.json +++ b/content/roadmaps/100-frontend/meta.json @@ -38,5 +38,5 @@ "imagePath": "/roadmaps/frontend.png", "resourcesPath": "./resources.md", "pdfUrl": "https://kamranahmedse.gumroad.com/l/frontend-roadmap", - "contentPathsFilePath": "/100-frontend/content-paths.json" + "contentPathsFilePath": "./content-paths.json" } \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml index 61153c2e3..bb6e6a19c 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -3,7 +3,7 @@ https://roadmap.sh/frontend monthly - 2021-12-03T13:36:03.206Z + 2021-12-03T14:00:37.506Z 1.0 diff --git a/scripts/content-skeleton.ts b/scripts/content-skeleton.ts index f21844374..d06f92b09 100644 --- a/scripts/content-skeleton.ts +++ b/scripts/content-skeleton.ts @@ -223,6 +223,6 @@ const roadmapMetaFilePath = path.join(roadmapDirPath, 'meta.json'); const roadmapMeta = require(roadmapMetaFilePath); // Put the content paths file path in the roadmap meta -roadmapMeta.contentPathsFilePath = contentPathsFilePath.replace(CONTENT_DIR, ''); +roadmapMeta.contentPathsFilePath = contentPathsFilePath.replace(roadmapDirPath, '.'); fs.writeFileSync(roadmapMetaFilePath, JSON.stringify(roadmapMeta, null, 2)); diff --git a/scripts/roadmaps-meta.js b/scripts/roadmaps-meta.js index e110825b0..fcbd6c54a 100644 --- a/scripts/roadmaps-meta.js +++ b/scripts/roadmaps-meta.js @@ -17,12 +17,17 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => { // So, we remove it and use the path relative to content directory let landingPath = roadmapMeta.landingPath; if (landingPath) { - landingPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), roadmapMeta.landingPath); + landingPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), landingPath); } let resourcesPath = roadmapMeta.resourcesPath; if (resourcesPath) { - resourcesPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), roadmapMeta.resourcesPath); + resourcesPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), resourcesPath); + } + + let contentPathsFilePath = roadmapMeta.contentPathsFilePath; + if (contentPathsFilePath) { + contentPathsFilePath = path.join(roadmapDir.replace(STORAGE_PATH, ''), contentPathsFilePath); } let metaPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), 'meta.json'); @@ -38,6 +43,7 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => { id: roadmapSlug, landingPath: landingPath, resourcesPath: resourcesPath, + contentPathsFilePath: contentPathsFilePath, metaPath: metaPath, isUpcoming: roadmapMeta.isUpcoming || false }