layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[Bug] Replace invalid Gatsby Link usage for external URLs and fix non-canonical routes

Open ayushbuilds-code opened this issue 3 weeks ago • 0 comments

Description

In several UI sections and community components, Gatsby's <Link> component (import { Link } from "gatsby") is mistakenly used for external URLs or contains hardcoded absolute domains, breaking client-side navigation. In addition, several components continue to reference legacy redirect routes instead of their canonical destinations.

  1. Invalid Gatsby <Link> on External URLs in Community Pages:

    • src/sections/Community/Members-grid/index.js (lines 84, 86, 90, 94, 99): Gatsby <Link> components are used for external links (LinkedIn company pages, https://getnighthawk.dev/, and YouTube channel). Because Gatsby's router intercepts clicks on <Link>, clicking these links fails client-side navigation instead of opening the external sites in a new tab.
    • src/sections/Community/Member-single/index.js (lines 168, 182): Gatsby <Link> is used for external badge links (https://docs.meshery.io/ and https://meshery.io/catalog).
  2. Hardcoded Domain in Gatsby <Link>:

    • src/sections/Community/Web-based-from/index.js (line 407): Uses <Link to="https://layer5.io/community/meshmates">. Gatsby <Link> expects a root-relative path (/community/meshmates) rather than an absolute protocol and host.
  3. Non-Canonical / Redirected Route Links in Section Components:

    • src/sections/CloudNativeDeployments/features.js (line 175): The "Kanvas Operator" feature card links to /cloud-native-management/kanvas/visualize, which is a legacy route that redirects to canonical /cloud-native-management/kanvas/operate.
    • src/sections/General/Navigation/utility/menu-items.js (line 310): The navigation dropdown links "Layer5 in the news" to /news instead of canonical /company/news.
    • src/sections/Community/Web-based-from/index.js (line 557): Links to /programs instead of canonical /careers/programs.
    • src/sections/Projects/Nighthawk/index.js (line 146): Links to /meshery instead of canonical /cloud-native-management/meshery.
    • src/collections/handbook/community/index.mdx (line 36): Links to /books/the-enterprise-path-to-service-mesh-architectures instead of canonical /learn/service-mesh-books/the-enterprise-path-to-service-mesh-architectures.

Expected Behavior

  • External links should use standard HTML <a> tags with target="_blank" and rel="noreferrer".
  • Internal links should use root-relative paths without hardcoded domains.
  • Navigation and feature links should directly target canonical routes rather than triggering client/server redirects.

Environment

  • Host OS: Any
  • Browser: Any

ayushbuilds-code avatar Nov 10 '26 09:11 ayushbuilds-code