Rename content path to landing path

pull/936/head
Kamran Ahmed 3 years ago
parent 064f97108e
commit 2ec335edc8
  1. 18
      content/roadmaps.json
  2. 2
      content/roadmaps/103-react/meta.json
  3. 2
      content/roadmaps/104-angular/meta.json
  4. 2
      content/roadmaps/105-android/meta.json
  5. 2
      content/roadmaps/106-python/meta.json
  6. 2
      content/roadmaps/107-golang/meta.json
  7. 2
      content/roadmaps/108-java/meta.json
  8. 2
      content/roadmaps/109-postgresql-dba/meta.json
  9. 2
      content/roadmaps/110-aws/meta.json
  10. 2
      content/roadmaps/111-qa/meta.json
  11. 2
      lib/roadmap.ts
  12. 8
      pages/[roadmap]/index.tsx
  13. 28
      public/sitemap.xml
  14. 8
      scripts/roadmaps-meta.js

@ -155,7 +155,7 @@
"isTextHeavy": false,
"isCommunity": false,
"featured": true,
"contentPath": "/roadmaps/103-react/landscape.md",
"landingPath": "/roadmaps/103-react/landscape.md",
"resourcesPath": "/roadmaps/103-react/resources.md",
"versions": [
"latest",
@ -196,7 +196,7 @@
"isTextHeavy": false,
"isCommunity": false,
"featured": true,
"contentPath": "/roadmaps/104-angular/landscape.md",
"landingPath": "/roadmaps/104-angular/landscape.md",
"resourcesPath": "/roadmaps/104-angular/resources.md",
"versions": [
"latest",
@ -237,7 +237,7 @@
"isTextHeavy": true,
"isCommunity": false,
"featured": true,
"contentPath": "/roadmaps/105-android/landscape.md",
"landingPath": "/roadmaps/105-android/landscape.md",
"resourcesPath": "/roadmaps/105-android/resources.md",
"versions": [
"latest",
@ -278,7 +278,7 @@
"isCommunity": false,
"featured": true,
"resourcesPath": "/roadmaps/106-python/resources.md",
"contentPath": "/roadmaps/106-python/landscape.md",
"landingPath": "/roadmaps/106-python/landscape.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/python-roadmap",
"versions": [
"latest"
@ -327,7 +327,7 @@
"isCommunity": false,
"isUpcoming": false,
"featured": true,
"contentPath": "/roadmaps/107-golang/landscape.md",
"landingPath": "/roadmaps/107-golang/landscape.md",
"resourcesPath": "/roadmaps/107-golang/resources.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/go-roadmap",
"versions": [
@ -377,7 +377,7 @@
"isCommunity": false,
"isUpcoming": false,
"featured": true,
"contentPath": "/roadmaps/108-java/landscape.md",
"landingPath": "/roadmaps/108-java/landscape.md",
"resourcesPath": "/roadmaps/108-java/resources.md",
"versions": [
"latest",
@ -421,7 +421,7 @@
"description": "Step by step guide to becoming a modern PostgreSQL DB Administrator in 2021",
"featuredTitle": "DBA",
"featuredDescription": "Step by step guide to become a PostgreSQL DBA in 2021",
"contentPath": "/roadmaps/109-postgresql-dba/landscape.md",
"landingPath": "/roadmaps/109-postgresql-dba/landscape.md",
"resourcesPath": "/roadmaps/109-postgresql-dba/resources.md",
"author": {
"name": "Alexey Lesovsky",
@ -460,7 +460,7 @@
"isCommunity": false,
"isUpcoming": true,
"featured": true,
"contentPath": "/roadmaps/110-aws/landscape.md",
"landingPath": "/roadmaps/110-aws/landscape.md",
"resourcesPath": "/roadmaps/110-aws/resources.md",
"versions": [
"latest",
@ -499,7 +499,7 @@
"featuredDescription": "Step by step guide to becoming a modern QA Engineer in 2021",
"isUpcoming": true,
"featured": true,
"contentPath": "/roadmaps/111-qa/landscape.md",
"landingPath": "/roadmaps/111-qa/landscape.md",
"resourcesPath": "/roadmaps/111-qa/resources.md",
"author": {
"name": "Anas Fitiani",

@ -23,7 +23,7 @@
"isTextHeavy": false,
"isCommunity": false,
"featured": true,
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"versions": [
"latest",

@ -23,7 +23,7 @@
"isTextHeavy": false,
"isCommunity": false,
"featured": true,
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"versions": [
"latest",

@ -23,7 +23,7 @@
"isTextHeavy": true,
"isCommunity": false,
"featured": true,
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"versions": [
"latest",

@ -24,7 +24,7 @@
"isCommunity": false,
"featured": true,
"resourcesPath": "./resources.md",
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/python-roadmap",
"versions": [
"latest"

@ -34,7 +34,7 @@
"isCommunity": false,
"isUpcoming": false,
"featured": true,
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"pdfUrl": "https://kamranahmedse.gumroad.com/l/go-roadmap",
"versions": [

@ -33,7 +33,7 @@
"isCommunity": false,
"isUpcoming": false,
"featured": true,
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"versions": [
"latest",

@ -27,7 +27,7 @@
"description": "Step by step guide to becoming a modern PostgreSQL DB Administrator in 2021",
"featuredTitle": "DBA",
"featuredDescription": "Step by step guide to become a PostgreSQL DBA in 2021",
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"author": {
"name": "Alexey Lesovsky",

@ -22,7 +22,7 @@
"isCommunity": false,
"isUpcoming": true,
"featured": true,
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"versions": [
"latest",

@ -23,7 +23,7 @@
"featuredDescription": "Step by step guide to becoming a modern QA Engineer in 2021",
"isUpcoming": true,
"featured": true,
"contentPath": "./landscape.md",
"landingPath": "./landscape.md",
"resourcesPath": "./resources.md",
"author": {
"name": "Anas Fitiani",

@ -16,7 +16,7 @@ export type RoadmapType = {
},
featured: boolean,
imagePath?: string,
contentPath?: string;
landingPath?: string;
resourcesPath: string;
metaPath: string;
isCommunity: boolean;

@ -33,18 +33,18 @@ function ImageRoadmap(props: RoadmapProps) {
function TextualRoadmap(props: RoadmapProps) {
const { roadmap } = props;
if (!roadmap.contentPath) {
if (!roadmap.landingPath) {
return null;
}
// Remove trailing slashes
const normalizedPath = roadmap.contentPath.replace(/^\//, '');
const RoadmapContent = require(`../../content/${normalizedPath}`).default;
const normalizedPath = roadmap.landingPath.replace(/^\//, '');
const LandingContent = require(`../../content/${normalizedPath}`).default;
return (
<Container maxW={'container.md'} position='relative'>
<MdRenderer>
<RoadmapContent />
<LandingContent />
</MdRenderer>
</Container>
);

@ -3,73 +3,73 @@
<url>
<loc>https://roadmap.sh/frontend</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.708Z</lastmod>
<lastmod>2021-11-27T18:10:50.401Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/backend</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.708Z</lastmod>
<lastmod>2021-11-27T18:10:50.403Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/devops</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.709Z</lastmod>
<lastmod>2021-11-27T18:10:50.403Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/react</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-05T18:22:27.709Z</lastmod>
<lastmod>2021-12-03T13:12:58.607Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/angular</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-29T15:27:47.590Z</lastmod>
<lastmod>2021-12-03T13:12:58.593Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/android</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:14:34.276Z</lastmod>
<lastmod>2021-12-03T13:12:58.614Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/python</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:14:34.274Z</lastmod>
<lastmod>2021-12-03T13:12:58.595Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/golang</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:20:55.096Z</lastmod>
<lastmod>2021-12-03T13:12:58.591Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/java</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-10-24T10:30:18.378Z</lastmod>
<lastmod>2021-12-03T13:12:58.610Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/postgresql-dba</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-30T21:14:34.272Z</lastmod>
<lastmod>2021-12-03T13:12:58.599Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/aws</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-09-22T12:34:39.639Z</lastmod>
<lastmod>2021-12-03T13:12:58.597Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/qa</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-11-03T19:30:14.028Z</lastmod>
<lastmod>2021-12-03T13:12:58.589Z</lastmod>
<priority>1.0</priority>
</url>
<url>
@ -255,7 +255,7 @@
<url>
<loc>https://roadmap.sh/</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-11-22T16:05:46.441Z</lastmod>
<lastmod>2021-11-27T11:45:44.569Z</lastmod>
<priority>1.0</priority>
</url>
<url>
@ -273,7 +273,7 @@
<url>
<loc>https://roadmap.sh/thanks</loc>
<changefreq>monthly</changefreq>
<lastmod>2021-11-19T12:59:26.864Z</lastmod>
<lastmod>2021-11-30T15:46:40.893Z</lastmod>
<priority>0.5</priority>
</url>
<url>

@ -15,9 +15,9 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
// We can't use the absolute path in the build e.g. ~/Users/user/where-build-is-running/content
// So, we remove it and use the path relative to content directory
let contentPath = roadmapMeta.contentPath;
if (contentPath) {
contentPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), roadmapMeta.contentPath);
let landingPath = roadmapMeta.landingPath;
if (landingPath) {
landingPath = path.join(roadmapDir.replace(STORAGE_PATH, ''), roadmapMeta.landingPath);
}
let resourcesPath = roadmapMeta.resourcesPath;
@ -36,7 +36,7 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
{
...roadmapMeta,
id: roadmapSlug,
contentPath: contentPath,
landingPath: landingPath,
resourcesPath: resourcesPath,
metaPath: metaPath,
isUpcoming: roadmapMeta.isUpcoming || false

Loading…
Cancel
Save