computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
904 B
40 lines
904 B
import roadmaps from '../content/roadmaps.json'; |
|
|
|
export type RoadmapType = { |
|
seo: { |
|
title: string; |
|
description: string; |
|
keywords: string[] |
|
}, |
|
title: string, |
|
description: string, |
|
featuredTitle: string; |
|
featuredDescription: string, |
|
author: { |
|
name: string, |
|
url: string |
|
}, |
|
featured: boolean, |
|
imagePath?: string, |
|
contentPath?: string; |
|
resourcesPath: string; |
|
metaPath: string; |
|
isCommunity: boolean; |
|
isUpcoming: boolean; |
|
id: string; |
|
pdfUrl?: string; |
|
}; |
|
|
|
export function getRoadmapById(id: string): RoadmapType | undefined { |
|
return (roadmaps as RoadmapType[]).find(roadmap => roadmap.id === id); |
|
} |
|
|
|
export function getAllRoadmaps(): RoadmapType[] { |
|
return (roadmaps as RoadmapType[]); |
|
} |
|
|
|
export function getFeaturedRoadmaps(): RoadmapType[] { |
|
const roadmaps: RoadmapType[] = getAllRoadmaps(); |
|
|
|
return roadmaps.filter(roadmap => roadmap.featured); |
|
}
|
|
|