Roadmap to becoming a developer in 2022
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.
 
 
 
 
 

37 lines
942 B

---
import {
getRoadmapTopicFiles,
type RoadmapTopicFileType,
} from '../../lib/roadmap-topic';
export async function getStaticPaths() {
const topicPathMapping = await getRoadmapTopicFiles();
return Object.keys(topicPathMapping).map((topicSlug) => {
const topicDetails = topicPathMapping[topicSlug];
const roadmapId = topicDetails.roadmapId;
const topicId = topicSlug.replace(`/${roadmapId}/`, '');
return {
params: {
topicId,
roadmapId,
},
props: topicDetails,
};
});
}
export const partial = true;
const { topicId } = Astro.params;
const { file, url, roadmapId, roadmap, heading } =
Astro.props as RoadmapTopicFileType;
const fileWithoutBasePath = file.file?.replace(/.+?\/src\/data/, '/src/data');
const gitHubUrl = `https://github.com/kamranahmedse/developer-roadmap/tree/master${fileWithoutBasePath}`;
---
<div data-github-url={gitHubUrl}></div>
<file.Content />