Update event labels for sponsor links

pull/3518/head
Kamran Ahmed 2 years ago
parent d08887060f
commit 60b1edcab9
  1. 14
      bin/update-sponsors.cjs
  2. 2
      src/data/roadmaps/backend/backend.md
  3. 2
      src/data/roadmaps/devops/devops.md
  4. 2
      src/data/roadmaps/graphql/graphql.md
  5. 2
      src/data/roadmaps/javascript/javascript.md
  6. 14
      src/data/roadmaps/python/python.md
  7. 2
      src/data/roadmaps/software-design-architecture/software-design-architecture.md

@ -51,10 +51,12 @@ 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
// roadmap dimensions in the fronmatter
@ -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');

@ -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."

@ -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."

@ -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."

@ -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."

@ -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."

@ -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."

Loading…
Cancel
Save