Add summary pages to landscape

pull/1657/head
Kamran Ahmed 5 years ago
parent 5b4d27ce78
commit 3f9e60447f
  1. 6
      components/detailed-roadmap/index.js
  2. 6
      scripts/roadmaps-meta.js
  3. 36
      static/sitemap.xml
  4. 45
      storage/roadmaps.json
  5. 0
      storage/roadmaps/1-frontend/landscape/0-Summary.md
  6. 0
      storage/roadmaps/2-backend/landscape/0-Summary.md
  7. 0
      storage/roadmaps/3-devops/landscape/0-Summary.md
  8. 0
      storage/roadmaps/4-fullstack/landscape/0-Summary.md
  9. 0
      storage/roadmaps/5-qa/landscape/0-Summary.md

@ -27,8 +27,12 @@ const DetailedRoadmap = ({ roadmap }) => {
<h3>{ groupTitle }</h3>
<ul>
{ sidebar[groupTitle].map(page => {
const isActivePage = page.url === currentPage.url;
// e.g. /frontend should mark `/frontend/summary` as active
const isSummaryPage = page.url === `${currentPage.url}/summary`;
return (
<li className={classNames({ active: page.url === currentPage.url })}>
<li className={classNames({ active: isActivePage || isSummaryPage })}>
<a href={ page.url }>
<span className="bullet"></span>
{ page.title }

@ -14,6 +14,10 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
const roadmapDir = path.join(ROADMAPS_PATH, roadmapDirName);
const roadmapMeta = require(path.join(roadmapDir, 'meta.json'));
// We can't use the absolute path in the build e.g. ~/Users/user/where-build-is-running/storage
// So, we remove it and use the path relative to storage directory
const summaryFilePath = path.join(roadmapDir.replace(STORAGE_PATH, ''), '/landscape/0-Summary.md')
const contributors = exec(`git log --pretty=format:"%an%x09" ${roadmapDir} | uniq`)
.toString()
.split('\n')
@ -72,7 +76,7 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
contributorsCount: contributorNames.length,
contributorsUrl: `/${roadmapSlug}/contributors`,
url: `/${roadmapSlug}`,
path: path.join(roadmapDir.replace(STORAGE_PATH, ''), '/summary.md'),
path: summaryFilePath,
sidebar,
},
];

@ -6,6 +6,18 @@
<lastmod>2019-11-30T10:14:37.750Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/frontend/contributors</loc>
<changefreq>monthly</changefreq>
<lastmod>2019-12-01T11:38:19.737Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/frontend/summary</loc>
<changefreq>monthly</changefreq>
<lastmod>2019-11-30T10:14:37.750Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/frontend/junior</loc>
<changefreq>monthly</changefreq>
@ -78,6 +90,12 @@
<lastmod>2019-11-30T10:14:31.255Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/backend/summary</loc>
<changefreq>monthly</changefreq>
<lastmod>2019-11-30T10:14:31.255Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/backend/junior</loc>
<changefreq>monthly</changefreq>
@ -102,6 +120,12 @@
<lastmod>2019-11-30T10:24:46.555Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/devops/summary</loc>
<changefreq>monthly</changefreq>
<lastmod>2019-11-30T10:24:46.555Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/devops/junior</loc>
<changefreq>monthly</changefreq>
@ -126,12 +150,24 @@
<lastmod>2019-11-27T20:14:37.663Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/fullstack/summary</loc>
<changefreq>monthly</changefreq>
<lastmod>2019-11-27T20:14:37.663Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/qa</loc>
<changefreq>monthly</changefreq>
<lastmod>2019-11-27T20:14:50.558Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/qa/summary</loc>
<changefreq>monthly</changefreq>
<lastmod>2019-11-27T20:14:50.558Z</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://roadmap.sh/guides/design-patterns-for-humans</loc>
<changefreq>monthly</changefreq>

@ -17,7 +17,7 @@
"contributorsCount": 1,
"contributorsUrl": "/frontend/contributors",
"url": "/frontend",
"path": "/roadmaps/1-frontend/summary.md",
"path": "/roadmaps/1-frontend/landscape/0-Summary.md",
"sidebar": {
"_others": [
{
@ -27,6 +27,11 @@
}
],
"landscape": [
{
"url": "/frontend/summary",
"title": "Summary",
"path": "/roadmaps/1-frontend/landscape/0-Summary.md"
},
{
"url": "/frontend/junior",
"title": "Junior",
@ -99,9 +104,14 @@
"contributorsCount": 1,
"contributorsUrl": "/backend/contributors",
"url": "/backend",
"path": "/roadmaps/2-backend/summary.md",
"path": "/roadmaps/2-backend/landscape/0-Summary.md",
"sidebar": {
"landscape": [
{
"url": "/backend/summary",
"title": "Summary",
"path": "/roadmaps/2-backend/landscape/0-Summary.md"
},
{
"url": "/backend/junior",
"title": "Junior",
@ -137,9 +147,14 @@
"contributorsCount": 1,
"contributorsUrl": "/devops/contributors",
"url": "/devops",
"path": "/roadmaps/3-devops/summary.md",
"path": "/roadmaps/3-devops/landscape/0-Summary.md",
"sidebar": {
"landscape": [
{
"url": "/devops/summary",
"title": "Summary",
"path": "/roadmaps/3-devops/landscape/0-Summary.md"
},
{
"url": "/devops/junior",
"title": "Junior",
@ -170,8 +185,16 @@
"contributorsCount": 1,
"contributorsUrl": "/fullstack/contributors",
"url": "/fullstack",
"path": "/roadmaps/4-fullstack/summary.md",
"sidebar": {}
"path": "/roadmaps/4-fullstack/landscape/0-Summary.md",
"sidebar": {
"landscape": [
{
"url": "/fullstack/summary",
"title": "Summary",
"path": "/roadmaps/4-fullstack/landscape/0-Summary.md"
}
]
}
},
{
"title": "QA Engineer",
@ -185,7 +208,15 @@
"contributorsCount": 1,
"contributorsUrl": "/qa/contributors",
"url": "/qa",
"path": "/roadmaps/5-qa/summary.md",
"sidebar": {}
"path": "/roadmaps/5-qa/landscape/0-Summary.md",
"sidebar": {
"landscape": [
{
"url": "/qa/summary",
"title": "Summary",
"path": "/roadmaps/5-qa/landscape/0-Summary.md"
}
]
}
}
]
Loading…
Cancel
Save