diff --git a/bin/update-sponsors.cjs b/bin/update-sponsors.cjs index 22ea6b896..ea8e2f9ed 100644 --- a/bin/update-sponsors.cjs +++ b/bin/update-sponsors.cjs @@ -51,12 +51,14 @@ function populateRoadmapAds({ const existingFrontmatter = roadmapFileContent.match(frontMatterRegex)[1]; const contentWithoutFrontmatter = roadmapFileContent.replace(frontMatterRegex, ``).trim(); - let fronmatterObj = yaml.load(existingFrontmatter); + let frontmatterObj = yaml.load(existingFrontmatter); + delete frontmatterObj.sponsor; if (shouldShowAd) { - const frontmatterValues = Object.entries(fronmatterObj); + const frontmatterValues = Object.entries(frontmatterObj); + const roadmapLabel = frontmatterObj.briefTitle; - // Insert sponsor data at 10 index i.e. after + // Insert sponsor data at 10 index i.e. after // roadmap dimensions in the fronmatter frontmatterValues.splice(10, 0, [ 'sponsor', @@ -68,17 +70,15 @@ function populateRoadmapAds({ event: { category: 'SponsorClick', action: `${company} Redirect`, - label: `Clicked ${company} Link`, + label: `${roadmapLabel} / ${company} Link`, }, }, ]); - fronmatterObj = Object.fromEntries(frontmatterValues); - } else { - delete fronmatterObj.sponsor; + frontmatterObj = Object.fromEntries(frontmatterValues); } - const newFrontmatter = yaml.dump(fronmatterObj, { lineWidth: 10000, forceQuotes: true, quotingType: '"' }); + const newFrontmatter = yaml.dump(frontmatterObj, { lineWidth: 10000, forceQuotes: true, quotingType: '"' }); const newContent = `---\n${newFrontmatter}---\n\n${contentWithoutFrontmatter}`; fs.writeFileSync(roadmapFilePath, newContent, 'utf8'); diff --git a/src/data/roadmaps/backend/backend.md b/src/data/roadmaps/backend/backend.md index 0100ad508..3a65aa57a 100644 --- a/src/data/roadmaps/backend/backend.md +++ b/src/data/roadmaps/backend/backend.md @@ -19,7 +19,7 @@ sponsor: event: category: "SponsorClick" action: "Fermyon Redirect" - label: "Clicked Fermyon Link" + label: "Backend / Fermyon Link" schema: headline: "Backend Developer Roadmap" description: "Learn how to become a Backend Developer with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place." diff --git a/src/data/roadmaps/devops/devops.md b/src/data/roadmaps/devops/devops.md index 822d4c976..6c27a4ff4 100644 --- a/src/data/roadmaps/devops/devops.md +++ b/src/data/roadmaps/devops/devops.md @@ -19,7 +19,7 @@ sponsor: event: category: "SponsorClick" action: "Ambassador Redirect" - label: "Clicked Ambassador Link" + label: "DevOps / Ambassador Link" schema: headline: "DevOps Roadmap" description: "Learn to become a DevOps, SRE or get any other operations role with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place." diff --git a/src/data/roadmaps/graphql/graphql.md b/src/data/roadmaps/graphql/graphql.md index 4cb8dd2f4..c7be38997 100644 --- a/src/data/roadmaps/graphql/graphql.md +++ b/src/data/roadmaps/graphql/graphql.md @@ -19,7 +19,7 @@ sponsor: event: category: "SponsorClick" action: "Apollo Redirect" - label: "Clicked Apollo Link" + label: "GraphQL / Apollo Link" schema: headline: "GraphQL Roadmap" description: "Learn how to use GraphQL with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place." diff --git a/src/data/roadmaps/javascript/javascript.md b/src/data/roadmaps/javascript/javascript.md index f716a05b6..83d0188a1 100644 --- a/src/data/roadmaps/javascript/javascript.md +++ b/src/data/roadmaps/javascript/javascript.md @@ -19,7 +19,7 @@ sponsor: event: category: "SponsorClick" action: "Fermyon Redirect" - label: "Clicked Fermyon Link" + label: "JavaScript / Fermyon Link" schema: headline: "JavaScript Roadmap" description: "Learn JavaScript with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place." diff --git a/src/data/roadmaps/python/python.md b/src/data/roadmaps/python/python.md index 8578a92ad..e50e2ef76 100644 --- a/src/data/roadmaps/python/python.md +++ b/src/data/roadmaps/python/python.md @@ -10,6 +10,12 @@ hasTopics: true dimensions: width: 992 height: 1259.03 +schema: + headline: "Python Roadmap" + description: "Learn Python with this interactive step by step guide in 2023. 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/python.png" + datePublished: "2023-01-05" + dateModified: "2023-01-20" sponsor: url: "https://www.fermyon.com/spin?utm_source=python&utm_medium=banner&utm_campaign=roadmap-sh" title: "Serverless Python Apps" @@ -18,13 +24,7 @@ sponsor: event: category: "SponsorClick" action: "Fermyon Redirect" - label: "Clicked Fermyon Link" -schema: - headline: "Python Roadmap" - description: "Learn Python with this interactive step by step guide in 2023. 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/python.png" - datePublished: "2023-01-05" - dateModified: "2023-01-20" + label: "Python / Fermyon Link" seo: title: "Learn to become a modern Python developer" description: "Community driven, articles, resources, guides, interview questions, quizzes for python development. Learn to become a modern Python developer by following the steps, skills, resources and guides listed in this roadmap." diff --git a/src/data/roadmaps/software-design-architecture/software-design-architecture.md b/src/data/roadmaps/software-design-architecture/software-design-architecture.md index 9ac4f2fe4..1c6612074 100644 --- a/src/data/roadmaps/software-design-architecture/software-design-architecture.md +++ b/src/data/roadmaps/software-design-architecture/software-design-architecture.md @@ -19,7 +19,7 @@ sponsor: event: category: "SponsorClick" action: "Apollo Redirect" - label: "Clicked Apollo Link" + label: "Design and Architecture / Apollo Link" schema: headline: "Software Design and Architecture Roadmap" description: "Learn Software Design and Architecture with this interactive step by step guide in 2023. We also have resources and short descriptions attached to the roadmap items so you can get everything you want to learn in one place."