Add python roadmap
This commit is contained in:
@ -25,6 +25,8 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
|
||||
resourcesPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), roadmapMeta.resourcesPath);
|
||||
}
|
||||
|
||||
let metaPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), 'meta.json');
|
||||
|
||||
console.log(`----------------------------`);
|
||||
console.log(`[#] Roadmap: ${roadmapMeta.title}`);
|
||||
console.log(`[x] Generating sidebar`);
|
||||
@ -36,6 +38,7 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
|
||||
id: roadmapSlug,
|
||||
contentPath: contentPath,
|
||||
resourcesPath: resourcesPath,
|
||||
metaPath: metaPath,
|
||||
isUpcoming: roadmapMeta.isUpcoming || false
|
||||
}
|
||||
];
|
||||
|
@ -72,14 +72,16 @@ function getPageRoutes() {
|
||||
return pageRoutes;
|
||||
}
|
||||
|
||||
function generateNode({
|
||||
slug,
|
||||
basePath,
|
||||
fileName,
|
||||
priority = null,
|
||||
date = null,
|
||||
frequency = 'monthly'
|
||||
}) {
|
||||
function generateNode(nodeProps) {
|
||||
const {
|
||||
slug,
|
||||
basePath,
|
||||
fileName,
|
||||
priority = null,
|
||||
date = null,
|
||||
frequency = 'monthly'
|
||||
} = nodeProps;
|
||||
|
||||
const pagePath = path.join(basePath, fileName);
|
||||
let pageStats = {};
|
||||
try {
|
||||
@ -126,7 +128,7 @@ function generateSiteMap() {
|
||||
const roadmapsChunk = roadmaps.map((roadmap, roadmapCounter) => {
|
||||
return generateNode({
|
||||
basePath: ROADMAPS_PATH,
|
||||
fileName: `${roadmapCounter + 1}-${roadmap.id}/meta.json`,
|
||||
fileName: roadmap.metaPath.replace('/roadmaps', ''),
|
||||
slug: `/${roadmap.id}`,
|
||||
date: roadmap.updatedAt,
|
||||
priority: '1.0'
|
||||
|
Reference in New Issue
Block a user