Compare commits

..

12 Commits

Author SHA1 Message Date
Arik Chakma
0560cc930a fix: topic path 2025-08-20 20:00:03 +06:00
Arik Chakma
c903b76934 fix: remove title 2025-08-20 19:34:41 +06:00
Arik Chakma
4f586fd122 fix: sync content description 2025-08-20 19:31:17 +06:00
Kamran Ahmed
cb7c13fd1b Make sync to not run for github actions 2025-08-20 14:24:21 +01:00
github-actions[bot]
704657cb36 Add content to Machine Learning (#9054)
* chore: sync content to repo

* Update src/data/roadmaps/machine-learning/introduction@MEL6y3vwiqwAV6FQihF34.md

* Update src/data/roadmaps/machine-learning/what-is-an-ml-engineer@FgzPlLUfGdlZPvPku0-Xl.md

---------

Co-authored-by: kamranahmedse <4921183+kamranahmedse@users.noreply.github.com>
Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
2025-08-20 14:21:03 +01:00
Kamran Ahmed
eba3a78c70 Update .github/workflows/sync-content-to-repo.yml 2025-08-20 13:49:19 +01:00
Kamran Ahmed
d6cf9eb66d Update .github/workflows/sync-content-to-repo.yml 2025-08-20 13:49:19 +01:00
Arik Chakma
885e95399e fix: sync repo to db 2025-08-20 13:49:19 +01:00
Arik Chakma
d70582411e chore: sync repo to database 2025-08-20 13:49:19 +01:00
Arik Chakma
07277708eb fix: replace the api endpoint 2025-08-20 13:49:19 +01:00
Arik Chakma
87280b4c9e chore: sync content to repo 2025-08-20 13:49:19 +01:00
Kamran Ahmed
91b0a232ab Fix typos 2025-08-20 13:02:32 +01:00
8 changed files with 59 additions and 23 deletions

View File

@@ -54,7 +54,7 @@ jobs:
automated pr
reviewers: arikchakma
commit-message: "chore: sync content to repo"
title: "Sync Content to Repo - Automated"
title: "chore: sync content to repository"
body: |
## Sync Content to Repo

View File

@@ -10,6 +10,7 @@ on:
jobs:
sync-on-changes:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]' && github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
with:
@@ -63,4 +64,4 @@ jobs:
echo "Changed files: ${{ steps.changed-files.outputs.changed_files }}"
# Run your script with the changed file paths
npm run sync:repo-to-database -- --files="${{ steps.changed-files.outputs.changed_files }}" --secret=${{ secrets.TOPIC_CONTENT_SYNC_SECRET }}
npm run sync:repo-to-database -- --files="${{ steps.changed-files.outputs.changed_files }}" --secret=${{ secrets.GH_SYNC_SECRET }}

View File

@@ -2,6 +2,7 @@ import fs from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { slugify } from '../src/lib/slugger';
import type { OfficialRoadmapDocument } from '../src/queries/official-roadmap';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -43,7 +44,6 @@ export interface OfficialRoadmapTopicContentDocument {
_id?: string;
roadmapSlug: string;
nodeId: string;
title: string;
description: string;
resources: OfficialRoadmapTopicResource[];
createdAt: Date;
@@ -68,6 +68,25 @@ export async function roadmapTopics(
return data;
}
export async function fetchRoadmapJson(
roadmapId: string,
): Promise<OfficialRoadmapDocument> {
const response = await fetch(
`https://roadmap.sh/api/v1-official-roadmap/${roadmapId}`,
);
if (!response.ok) {
throw new Error(`Failed to fetch roadmap json: ${response.statusText}`);
}
const data = await response.json();
if (data.error) {
throw new Error(`Failed to fetch roadmap json: ${data.error}`);
}
return data;
}
// Directory containing the roadmaps
const ROADMAP_CONTENT_DIR = path.join(
__dirname,
@@ -76,12 +95,27 @@ const ROADMAP_CONTENT_DIR = path.join(
);
const allTopics = await roadmapTopics(roadmapSlug, secret);
const roadmap = await fetchRoadmapJson(roadmapSlug);
const { nodes } = roadmap;
for (const topic of allTopics) {
const { title, nodeId } = topic;
const { nodeId } = topic;
const topicSlug = `${slugify(title)}@${nodeId}.md`;
const node = nodes.find((node) => node.id === nodeId);
if (!node) {
console.error(`Node not found: ${nodeId}`);
continue;
}
const topicPath = path.join(ROADMAP_CONTENT_DIR, topicSlug);
const label = node?.data?.label as string;
if (!label) {
console.error(`Label not found: ${nodeId}`);
continue;
}
const topicSlug = `${slugify(label)}@${nodeId}.md`;
const topicPath = path.join(ROADMAP_CONTENT_DIR, 'content', topicSlug);
const topicDir = path.dirname(topicPath);
const topicDirExists = await fs
.stat(topicDir)
@@ -99,12 +133,10 @@ for (const topic of allTopics) {
function prepareTopicContent(topic: OfficialRoadmapTopicContentDocument) {
const { description, resources = [] } = topic;
const content = `${description}
Visit the following resources to learn more:
${resources.map((resource) => `- [@${resource.type}@${resource.title}](${resource.url})`).join('\n')}
`.trim();
let content = description;
if (resources.length > 0) {
content += `\n\nVisit the following resources to learn more:\n\n${resources.map((resource) => `- [@${resource.type}@${resource.title}](${resource.url})`).join('\n')}`;
}
return content;
}

View File

@@ -1,7 +1,6 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { slugify } from '../src/lib/slugger';
import type { OfficialRoadmapDocument } from '../src/queries/official-roadmap';
import { parse } from 'node-html-parser';
import { markdownToHtml } from '../src/lib/markdown';
@@ -192,9 +191,8 @@ try {
const htmlStringWithoutLinks = rootHtml.toString();
const description = htmlToMarkdown(htmlStringWithoutLinks);
const updatedDescription = `# ${title?.textContent}
${description}`.trim();
const updatedDescription =
`# ${title?.textContent}\n\n${description}`.trim();
const label = node?.data?.label as string;
if (!label) {
@@ -205,7 +203,6 @@ ${description}`.trim();
topics.push({
roadmapSlug,
nodeId,
title: label,
description: updatedDescription,
resources: listLinks,
});

View File

@@ -25,7 +25,7 @@ export function ForkCourseAlert(props: ForkCourseAlertProps) {
)}
>
<p className="text-sm text-balance">
Fork the course to track progress and make changes to the course.
Fork the course to track you progress and make changes to the course.
</p>
<button

View File

@@ -4,9 +4,9 @@ pdfUrl: '/pdfs/roadmaps/data-engineer.pdf'
order: 4.6
renderer: "editor"
briefTitle: 'Data Engineer'
briefDescription: 'Step by step guide to becoming an Data Engineer in 2025'
briefDescription: 'Step by step guide to becoming a Data Engineer in 2025'
title: 'Data Engineer Roadmap'
description: 'Step by step guide to becoming an Data Engineer in 2025'
description: 'Step by step guide to becoming a Data Engineer in 2025'
hasTopics: true
isNew: true
dimensions:
@@ -28,17 +28,17 @@ courses:
title: 'Founder - roadmap.sh'
schema:
headline: 'Data Engineer Roadmap'
description: 'Learn how to become an Data Engineer with this interactive step by step guide in 2025. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.'
description: 'Learn how to become a Data Engineer with this interactive step by step guide in 2025. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place.'
imageUrl: 'https://roadmap.sh/roadmaps/data-engineer.png'
datePublished: '2025-08-13'
dateModified: '2025-08-13'
seo:
title: 'Data Engineer Roadmap'
description: 'Learn to become an Data Engineer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern data engineers.'
description: 'Learn to become a Data Engineer using this roadmap. Community driven, articles, resources, guides, interview questions, quizzes for modern data engineers.'
keywords:
- 'data engineer roadmap 2025'
- 'data engineering roadmap 2025'
- 'guide to becoming an data engineer'
- 'guide to becoming a data engineer'
- 'easy data engineer roadmap'
- 'data engineer'
- 'data engineer roadmap'

View File

@@ -0,0 +1,3 @@
# Introduction to Machine Learning
Machine learning is about creating computer programs that can learn from data. Instead of being explicitly programmed to perform a task, these programs improve their performance on a specific task as they are exposed to more data. This learning process allows them to make predictions or decisions without being directly told how to do so.

View File

@@ -0,0 +1,3 @@
# ML Engineer
An ML Engineer focuses on building, deploying, and maintaining machine learning systems in production. They bridge the gap between data science and software engineering, taking models developed by data scientists and making them scalable, reliable, and efficient for real-world applications. This involves tasks like data pipeline construction, model deployment, performance monitoring, and infrastructure management.