Add summary pages to landscape

pull/1331/head
Kamran Ahmed 5 years ago
parent 10e433f538
commit a06eaec5d4
  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> <h3>{ groupTitle }</h3>
<ul> <ul>
{ sidebar[groupTitle].map(page => { { 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 ( return (
<li className={classNames({ active: page.url === currentPage.url })}> <li className={classNames({ active: isActivePage || isSummaryPage })}>
<a href={ page.url }> <a href={ page.url }>
<span className="bullet"></span> <span className="bullet"></span>
{ page.title } { page.title }

@ -14,6 +14,10 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
const roadmapDir = path.join(ROADMAPS_PATH, roadmapDirName); const roadmapDir = path.join(ROADMAPS_PATH, roadmapDirName);
const roadmapMeta = require(path.join(roadmapDir, 'meta.json')); 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`) const contributors = exec(`git log --pretty=format:"%an%x09" ${roadmapDir} | uniq`)
.toString() .toString()
.split('\n') .split('\n')
@ -72,7 +76,7 @@ const roadmapsMeta = roadmapDirs.reduce((metaAcc, roadmapDirName) => {
contributorsCount: contributorNames.length, contributorsCount: contributorNames.length,
contributorsUrl: `/${roadmapSlug}/contributors`, contributorsUrl: `/${roadmapSlug}/contributors`,
url: `/${roadmapSlug}`, url: `/${roadmapSlug}`,
path: path.join(roadmapDir.replace(STORAGE_PATH, ''), '/summary.md'), path: summaryFilePath,
sidebar, sidebar,
}, },
]; ];

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

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