parent
7a72c96e79
commit
ad7ba44a2e
1 changed files with 32 additions and 0 deletions
@ -0,0 +1,32 @@ |
||||
--- |
||||
import { getAllBestPractices } from '../lib/best-pratice'; |
||||
import { getAllGuides } from '../lib/guide'; |
||||
import { getRoadmapsByTag } from '../lib/roadmap'; |
||||
import { getAllVideos } from '../lib/video'; |
||||
|
||||
const guides = await getAllGuides(); |
||||
const videos = await getAllVideos(); |
||||
const roadmaps = await getRoadmapsByTag('roadmap'); |
||||
const bestPractices = await getAllBestPractices(); |
||||
|
||||
const formattedData = { |
||||
Roadmaps: roadmaps.map((roadmap) => ({ |
||||
url: `/${roadmap.id}`, |
||||
title: roadmap.frontmatter.briefTitle, |
||||
})), |
||||
'Best Practices': bestPractices.map((bestPractice) => ({ |
||||
url: `/${bestPractice.id}`, |
||||
title: bestPractice.frontmatter.briefTitle, |
||||
})), |
||||
Guides: guides.map((guide) => ({ |
||||
url: `/${guide.id}`, |
||||
title: guide.frontmatter.title, |
||||
})), |
||||
Videos: videos.map((guide) => ({ |
||||
url: `/${guide.id}`, |
||||
title: guide.frontmatter.title, |
||||
})), |
||||
}; |
||||
--- |
||||
|
||||
{JSON.stringify(formattedData)} |
Loading…
Reference in new issue