Skip to content

fix: fixing the roadmap page issue/bug it was redirecting to github l…#1338

Open
sachinggsingh wants to merge 2 commits intorecodehive:mainfrom
sachinggsingh:docs/docker-content
Open

fix: fixing the roadmap page issue/bug it was redirecting to github l…#1338
sachinggsingh wants to merge 2 commits intorecodehive:mainfrom
sachinggsingh:docs/docker-content

Conversation

@sachinggsingh
Copy link
Copy Markdown
Contributor

…ink data was already present in src/data/roadmaps folder fixing (#1253)

Description

Fixes # (issue)

Type of Change

  • [ x] New feature (e.g., new page, component, or functionality)
  • [ x] Bug fix (non-breaking change that fixes an issue)
  • [ x] UI/UX improvement (design, layout, or styling updates)
  • Performance optimization (e.g., code splitting, caching)
  • Documentation update (README, contribution guidelines, etc.)
  • Other (please specify):

Changes Made

Dependencies

  • List any new dependencies or tools required for this change.
  • Mention any version updates or configurations that need to be considered.

Checklist

  • [ x] My code follows the style guidelines of this project.
  • [ x] I have tested my changes across major browsers and devices
  • [ x] My changes do not generate new console warnings or errors .
  • [ x] I ran npm run build and attached screenshot(s) in this PR.
  • [ x] This is already assigned Issue to me, not an unassigned issue.

…ink data was already present in src/data/roadmaps folder fixing (recodehive#1253)
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 24, 2026

@sachinggsingh is attempting to deploy a commit to the recode Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs.

In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊

Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv.

We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰

🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨

📚Your perks for contribution to this community 👇🏻

  1. Get free Consultation use code recode50 to get free: Mentorship for free.

  2. Get the Ebook for free use code recode at checkout: Data Science cheatsheet for Beginners.

  3. Check out this weekly Newsletter: Sanjay's Newsletter.

If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@github-actions github-actions Bot added recode this is label for leaderboard level 1 10 points wcos labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown

✅ Synchronized metadata from Issue #1253:

  • Labels: level 1, recode, wcos
  • Milestone: None

@github-actions
Copy link
Copy Markdown

✅ Synchronized metadata from Issue #1253:

  • Labels: level 1, recode, wcos
  • Milestone: None

@sachinggsingh
Copy link
Copy Markdown
Contributor Author

hi @sanjay-kv have work done on #1127 but i have pushed the code in this i think in this pr #1338 kindly have a look i have worked on the roadmap and social link for blogs bug

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
recode-website Error Error Apr 26, 2026 2:36am

@sanjay-kv
Copy link
Copy Markdown
Member

there was some deployment error

12:34:50.878 Running build in Washington, D.C., USA (East) – iad1
12:34:50.878 Build machine configuration: 4 cores, 8 GB
12:34:50.979 Cloning github.com/recodehive/recode-website (Branch: docs/docker-content, Commit: 0dbd2e4)
12:34:53.352 Cloning completed: 2.372s
12:34:53.481 Restored build cache from previous deployment (8wdGjxqcsd8TnuDggUXuuC2DMT7M)
12:34:53.799 Running "vercel build"
12:34:54.420 Vercel CLI 51.6.1
12:34:54.977 Warning: Due to "engines": { "node": ">=18.0" } in your package.json file, the Node.js Version defined in your Project Settings ("22.x") will not apply, Node.js Version "24.x" will be used instead. Learn More: https://vercel.link/node-version
12:34:54.978 Warning: Detected "engines": { "node": ">=18.0" } in your package.json that will automatically upgrade when a new major Node.js Version is released. Learn More: https://vercel.link/node-version
12:34:54.997 Installing dependencies...
12:34:57.897
12:34:57.898 > recodehive@0.0.0 prepare
12:34:57.898 > husky
12:34:57.898
12:34:57.964
12:34:57.964 up to date in 3s
12:34:57.964
12:34:57.964 556 packages are looking for funding
12:34:57.964 run npm fund for details
12:34:58.012 Running "npm run build"
12:34:58.107
12:34:58.107 > recodehive@0.0.0 build
12:34:58.107 > docusaurus build
12:34:58.107
12:34:59.297 [dotenv@17.2.3] injecting env (0) from .env -- tip: ⚙️ specify custom .env file path with { path: '/custom/path/.env' }
12:34:59.453 [INFO] [en] Creating an optimized production build...
12:34:59.461 [dotenv@17.2.3] injecting env (0) from .env -- tip: 👥 sync secrets across teammates & machines: https://dotenvx.com/ops
12:35:00.462 [baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
12:35:00.475 Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
12:35:00.476 npx update-browserslist-db@latest
12:35:00.476 Why you should do it regularly: https://github.com/browserslist/update-db#readme
12:35:00.531 [info] [webpackbar] Compiling Client
12:35:00.551 [info] [webpackbar] Compiling Server
12:35:55.856 [success] [webpackbar] Server: Compiled successfully in 55.30s
12:36:22.628 [baseline-browser-mapping] The data in this module is over two months old. To ensure accurate Baseline data, please update: npm i baseline-browser-mapping@latest -D
12:36:26.398 Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
12:36:26.399 npx update-browserslist-db@latest
12:36:26.399 Why you should do it regularly: https://github.com/browserslist/update-db#readme
12:36:26.702 [success] [webpackbar] Client: Compiled successfully in 1.44m
12:36:38.260
12:36:38.262 [ERROR] Error: Unable to build website for locale en.
12:36:38.262 at tryToBuildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build/build.js:83:15)
12:36:38.262 at async /vercel/path0/node_modules/@docusaurus/core/lib/commands/build/build.js:35:9
12:36:38.262 ... 4 lines matching cause stack trace ...
12:36:38.263 at async file:///vercel/path0/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 {
12:36:38.263 [cause]: Error: Docusaurus found broken links!
12:36:38.263
12:36:38.263 Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
12:36:38.263 Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.
12:36:38.263
12:36:38.263 Exhaustive list of all broken links found:
12:36:38.263 - Broken link on source page path = /blog/authors:
12:36:38.263 -> linking to ajay.dhangar.2001 (resolved as: /blog/ajay.dhangar.2001)
12:36:38.263 - Broken link on source page path = /blog/authors/ajay-dhangar:
12:36:38.263 -> linking to ajay.dhangar.2001 (resolved as: /blog/authors/ajay.dhangar.2001)
12:36:38.263
12:36:38.263 at throwError (/vercel/path0/node_modules/@docusaurus/logger/lib/logger.js:80:11)
12:36:38.263 at reportBrokenLinks (/vercel/path0/node_modules/@docusaurus/core/lib/server/brokenLinks.js:250:47)
12:36:38.263 at handleBrokenLinks (/vercel/path0/node_modules/@docusaurus/core/lib/server/brokenLinks.js:282:5)
12:36:38.263 at executeBrokenLinksCheck (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:119:47)
12:36:38.264 at /vercel/path0/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:94:67
12:36:38.264 at Object.async (/vercel/path0/node_modules/@docusaurus/logger/lib/perfLogger.js:42:47)
12:36:38.264 at buildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:94:31)
12:36:38.264 at async runBuildLocaleTask (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build/build.js:98:5)
12:36:38.264 at async /vercel/path0/node_modules/@docusaurus/core/lib/commands/build/build.js:79:13
12:36:38.264 at async tryToBuildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build/build.js:75:9)
12:36:38.264 at async /vercel/path0/node_modules/@docusaurus/core/lib/commands/build/build.js:35:9
12:36:38.264 at async mapAsyncSequential (/vercel/path0/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
12:36:38.265 at async Command.build (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build/build.js:34:5)
12:36:38.265 at async Promise.all (index 0)
12:36:38.265 at async runCLI (/vercel/path0/node_modules/@docusaurus/core/lib/commands/cli.js:56:5)
12:36:38.265 at async file:///vercel/path0/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3
12:36:38.265 }
12:36:38.266 [INFO] Docusaurus version: 3.9.1
12:36:38.266 Node version: v24.14.1
12:36:38.378 Error: Command "npm run build" exited with 1

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the navbar “Roadmap” link to point to an internal /roadmap page and introduces a new Roadmap landing page backed by existing src/data/roadmaps data. It also expands blog author metadata and UI to display author avatars and social links on blog-related pages.

Changes:

  • Update navbar Roadmap link from an external GitHub Project to the new internal /roadmap page.
  • Add a new /roadmap page + styling that renders cards from src/data/roadmaps.
  • Enhance blog author rendering by adding socials metadata and UI (custom BlogPostAuthor theme component + updated /blogs cards).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
docusaurus.config.ts Routes navbar “🗺️ Roadmap” to /roadmap.
src/pages/roadmap/index.tsx New Roadmap page rendering roadmap cards from src/data/roadmaps.
src/pages/roadmap/roadmap.css Styling for the new Roadmap page layout/cards.
src/data/roadmaps/index.tsx Source of roadmap/lesson data consumed by the new page (used, not modified in this PR).
src/utils/authors.ts Changes authors map to include name + socials, and updates getAuthorNames accordingly.
blog/authors.yml Adds socials metadata for blog authors and fixes tiletitle.
src/theme/BlogPostAuthor/index.tsx New theme override to render author avatar/name/title plus socials.
src/theme/BlogPostAuthor/styles.module.css Adds styling for author photo presentation.
src/theme/BlogPostAuthor/Socials/index.tsx New socials renderer that maps platform → icon and constructs profile URLs.
src/theme/BlogPostAuthor/Socials/styles.module.css Styling for social icon links.
src/pages/blogs/index.tsx Updates blog cards to render author avatars + social icons using authorsMap.
src/pages/blogs/blogs-new.css Adds styling for the multi-author layout + social icon buttons on blog cards.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +45 to +78
let href = handle;

if (!handle.startsWith('http')) {
switch (platform.toLowerCase()) {
case 'github':
href = `https://github.com/${handle}`;
break;
case 'twitter':
case 'x':
href = `https://x.com/${handle}`;
break;
case 'linkedin':
href = `https://www.linkedin.com/in/${handle}`;
break;
case 'instagram':
href = `https://www.instagram.com/${handle}`;
break;
case 'youtube':
href = `https://www.youtube.com/@${handle}`;
break;
case 'facebook':
href = `https://www.facebook.com/${handle}`;
break;
case 'medium':
href = `https://medium.com/@${handle}`;
break;
case 'hashnode':
href = `https://hashnode.com/@${handle}`;
break;
case 'stackoverflow':
href = `https://stackoverflow.com/users/${handle}`;
break;
case 'bluesky':
href = `https://bsky.app/profile/${handle}`;
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle can be a non-string (e.g., stackoverflow: 8332327 in blog/authors.yml will parse as a number). Calling handle.startsWith(...) will throw at runtime and break blog pages. Coerce handle to a string (e.g., const handleStr = String(handle)), and use that for startsWith + URL construction (and keep href as the original string URL when it already looks like an absolute URL).

Suggested change
let href = handle;
if (!handle.startsWith('http')) {
switch (platform.toLowerCase()) {
case 'github':
href = `https://github.com/${handle}`;
break;
case 'twitter':
case 'x':
href = `https://x.com/${handle}`;
break;
case 'linkedin':
href = `https://www.linkedin.com/in/${handle}`;
break;
case 'instagram':
href = `https://www.instagram.com/${handle}`;
break;
case 'youtube':
href = `https://www.youtube.com/@${handle}`;
break;
case 'facebook':
href = `https://www.facebook.com/${handle}`;
break;
case 'medium':
href = `https://medium.com/@${handle}`;
break;
case 'hashnode':
href = `https://hashnode.com/@${handle}`;
break;
case 'stackoverflow':
href = `https://stackoverflow.com/users/${handle}`;
break;
case 'bluesky':
href = `https://bsky.app/profile/${handle}`;
const handleStr = String(handle);
let href =
typeof handle === 'string' && handle.startsWith('http')
? handle
: handleStr;
if (!handleStr.startsWith('http')) {
switch (platform.toLowerCase()) {
case 'github':
href = `https://github.com/${handleStr}`;
break;
case 'twitter':
case 'x':
href = `https://x.com/${handleStr}`;
break;
case 'linkedin':
href = `https://www.linkedin.com/in/${handleStr}`;
break;
case 'instagram':
href = `https://www.instagram.com/${handleStr}`;
break;
case 'youtube':
href = `https://www.youtube.com/@${handleStr}`;
break;
case 'facebook':
href = `https://www.facebook.com/${handleStr}`;
break;
case 'medium':
href = `https://medium.com/@${handleStr}`;
break;
case 'hashnode':
href = `https://hashnode.com/@${handleStr}`;
break;
case 'stackoverflow':
href = `https://stackoverflow.com/users/${handleStr}`;
break;
case 'bluesky':
href = `https://bsky.app/profile/${handleStr}`;

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +13
import React from 'react';
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import Socials from '@theme/BlogPostAuthor/Socials';
import styles from './styles.module.css';

export default function BlogPostAuthor({author, className}) {
const {name, title, url, imageURL, socials} = author;
return (
<div className={clsx('avatar margin-bottom--sm', className)}>
{imageURL && (
<Link className="avatar__photo-link" href={url || imageURL}>
<img className={clsx('avatar__photo', styles.authorPhoto)} src={imageURL} alt={name} />
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new theme components use single quotes, but the repo’s Prettier config has singleQuote: false. Running the formatter/format check will rewrite these and may fail CI if not formatted. Please update imports/strings to use double quotes (or run npm run format).

Suggested change
import React from 'react';
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import Socials from '@theme/BlogPostAuthor/Socials';
import styles from './styles.module.css';
export default function BlogPostAuthor({author, className}) {
const {name, title, url, imageURL, socials} = author;
return (
<div className={clsx('avatar margin-bottom--sm', className)}>
{imageURL && (
<Link className="avatar__photo-link" href={url || imageURL}>
<img className={clsx('avatar__photo', styles.authorPhoto)} src={imageURL} alt={name} />
import React from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import Socials from "@theme/BlogPostAuthor/Socials";
import styles from "./styles.module.css";
export default function BlogPostAuthor({author, className}) {
const {name, title, url, imageURL, socials} = author;
return (
<div className={clsx("avatar margin-bottom--sm", className)}>
{imageURL && (
<Link className="avatar__photo-link" href={url || imageURL}>
<img className={clsx("avatar__photo", styles.authorPhoto)} src={imageURL} alt={name} />

Copilot uses AI. Check for mistakes.
import styles from './styles.module.css';

export default function BlogPostAuthor({author, className}) {
const {name, title, url, imageURL, socials} = author;
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

socials is destructured from author but never used in this component, which triggers @typescript-eslint/no-unused-vars warnings. Remove it from the destructuring (or otherwise use it).

Suggested change
const {name, title, url, imageURL, socials} = author;
const {name, title, url, imageURL} = author;

Copilot uses AI. Check for mistakes.
Comment thread docusaurus.config.ts
{
label: "🗺️ Roadmap",
to: "https://github.com/orgs/recodehive/projects/9",
to: "/roadmap"
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting: this object entry is missing a trailing comma after to: "/roadmap". The repo runs Prettier with trailing commas, so npm run format:check is likely to fail until this is formatted.

Suggested change
to: "/roadmap"
to: "/roadmap",

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +31
FaMedium,
// FaHashnod÷e,
FaExternalLinkAlt,
FaRss,
} from 'react-icons/fa';
import { FaXTwitter } from 'react-icons/fa6';
import { SiBluesky, SiSubstack } from 'react-icons/si';
import styles from './styles.module.css';

const SocialIcons = {
github: FaGithub,
twitter: FaTwitter,
x: FaXTwitter,
linkedin: FaLinkedin,
instagram: FaInstagram,
youtube: FaYoutube,
facebook: FaFacebook,
stackoverflow: FaStackOverflow,
medium: FaMedium,
// hashnode: FaHashn÷ode,
newsletter: SiSubstack,
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are garbled characters in the commented-out Hashnode icon names (FaHashnod÷e / FaHashn÷ode). Even though they’re commented, they’re likely accidental and make the file harder to maintain—please clean these up (and re-add Hashnode support when needed).

Copilot uses AI. Check for mistakes.
Comment thread src/pages/blogs/index.tsx
Comment on lines +336 to +343
<img
src={author.id ? `https://github.com/${author.socials?.github || author.id}.png` : ""}
alt={author.name}
className="author-img"
onError={(e) => {
(e.target as HTMLImageElement).src = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E";
}}
/>
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These author avatar images are loaded from GitHub for every card. Consider adding loading="lazy" to reduce initial page load cost, and prefer avatars.githubusercontent.com/<user>?size=... (or a locally cached image) to avoid redirects and reduce external dependency/latency.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +18
import React from 'react';
import Link from '@docusaurus/Link';
import {
FaGithub,
FaTwitter,
FaLinkedin,
FaInstagram,
FaYoutube,
FaFacebook,
FaStackOverflow,
FaMedium,
// FaHashnod÷e,
FaExternalLinkAlt,
FaRss,
} from 'react-icons/fa';
import { FaXTwitter } from 'react-icons/fa6';
import { SiBluesky, SiSubstack } from 'react-icons/si';
import styles from './styles.module.css';
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file also uses single quotes while Prettier is configured for double quotes (singleQuote: false). Please reformat to match the repo formatting settings.

Copilot uses AI. Check for mistakes.
Comment on lines +85 to +92
return (
<Link
key={platform}
href={href}
className={styles.socialLink}
title={platform.charAt(0).toUpperCase() + platform.slice(1)}>
<Icon />
</Link>
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rendered social links are icon-only. Please add an aria-label per platform (and consider target/rel behavior if you intend these to open externally) so the links are usable with screen readers.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +8
import { roadmaps } from "../../data/roadmaps";
import "./roadmap.css";

const RoadmapCard = ({ roadmap, index }: { roadmap: any; index: number }) => {
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roadmap is typed as any, which triggers the repo’s no-explicit-any lint warnings and loses type safety. Since src/data/roadmaps exports MyRoadmap, consider importing that type and using it here (e.g., roadmap: MyRoadmap).

Suggested change
import { roadmaps } from "../../data/roadmaps";
import "./roadmap.css";
const RoadmapCard = ({ roadmap, index }: { roadmap: any; index: number }) => {
import { roadmaps, type MyRoadmap } from "../../data/roadmaps";
import "./roadmap.css";
const RoadmapCard = ({ roadmap, index }: { roadmap: MyRoadmap; index: number }) => {

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +26
<div className="roadmap-card-stats">
<span className="roadmap-stat">{roadmap.lessons.length} Lessons</span>
<a href={roadmap.lessons[0]?.link || "#"} className="roadmap-button" target="_blank" rel="noopener noreferrer">
View Roadmap
</a>
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a roadmap ever has zero lessons, the current link falls back to "#" but still opens a new tab. Consider conditionally rendering/disabling the "View Roadmap" button when roadmap.lessons.length === 0, or link to a dedicated internal roadmap detail page instead of "#".

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level 1 10 points recode this is label for leaderboard wcos

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants