Skip to content

fix: update developer-hub paths to include /docs#482

Open
AtoMicKraK1n wants to merge 2 commits intometaplex-foundation:mainfrom
AtoMicKraK1n:fix/solana-docs-links
Open

fix: update developer-hub paths to include /docs#482
AtoMicKraK1n wants to merge 2 commits intometaplex-foundation:mainfrom
AtoMicKraK1n:fix/solana-docs-links

Conversation

@AtoMicKraK1n
Copy link
Copy Markdown

Description

Fixed broken navigation in the Solana section where links were missing the /docs prefix, causing incorrect redirects to the homepage.

Changes:

  • Updated internal paths to include /docs.

  • Verified links now resolve correctly instead of redirecting to metaplex.com.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

@AtoMicKraK1n is attempting to deploy a commit to the Metaplex Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

Summary by CodeRabbit

  • Documentation

    • Reorganized and expanded Genesis, Core Candy Machine, Bubblegum, and Token Metadata guides with more specific SDK, API, CLI, and tutorial entries.
    • Added Solana fundamentals, CLI commands, agent resources, and additional minting/collection/management topics for clearer, more actionable guidance.
  • Chores

    • Updated documentation routing and guide links for improved discoverability; cleaned up guide index formatting and UI rendering for consistency.

Walkthrough

Updated documentation index entries and reorganized guide routing: public/llms.txt was restructured (Genesis, Core Candy Machine, Bubblegum, Token Metadata, CLI/agent/solana guides) and guide link paths in the UI component were migrated to a unified /docs prefix.

Changes

Cohort / File(s) Summary
Documentation index
public/llms.txt
Reworked Genesis section to reference Genesis SDK/integration endpoints; expanded Core Candy Machine entries (program overview, creation, guards, SDK docs, mint/insert/update tutorials); replaced/expanded Bubblegum V2 links (JS SDK, collection management, canopy, hashing/leaf schema, burn/transfer/delegate/freeze, stored/indexed data); added Token Metadata guide; replaced old "Guides" list with Genesis/Bubblegum CLIs, Solana fundamentals, and agent-related pages.
Guide UI / routing
src/components/helperComponents/guideIndex.jsx
Migrated guide path roots from legacy prefixes (/smart-contracts, /solana, /dev-tools, etc.) to the /docs base path; minor formatting/JSX readability changes (multi-line conditionals, trailing commas) with no public API changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • brandontulsi
  • MarkSackerberg
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main change: updating paths to include the /docs prefix to fix broken navigation links.
Description check ✅ Passed The description clearly explains the problem (broken navigation due to missing /docs prefix) and the solution (updating internal paths), matching the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
public/llms.txt (1)

1-589: ⚠️ Potential issue | 🔴 Critical

Do not manually edit this auto-generated file; update the generation script instead.

This file is generated during the build process by scripts/generate-llms-txt.mjs and written to public/llms.txt. The build script runs:

node scripts/generate-llms-txt.mjs && next build

Any manual edits to public/llms.txt will be overwritten on the next build. To make changes, update scripts/generate-llms-txt.mjs or modify the source markdown files it reads from (src/pages/en).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@public/llms.txt` around lines 1 - 589, The public llms.txt file was manually
edited but is auto-generated; revert any manual changes to llms.txt and instead
apply your edits to the generator or its sources: update the generation script
generate-llms-txt.mjs or the source markdown files used by that script (the "en"
pages), then run the canonical build step (node generate-llms-txt.mjs && next
build) so the file is regenerated correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/helperComponents/guideIndex.jsx`:
- Line 174: The route entry defined by the path property in guideIndex.jsx
contains a duplicated "/docs/docs/" prefix causing 404s; update the path value
for that entry (the object with path:
'/docs/docs/smart-contracts/core/guides/anchor/how-to-create-a-core-nft-asset-with-anchor')
to remove the extra "/docs" so it reads
'/docs/smart-contracts/core/guides/anchor/how-to-create-a-core-nft-asset-with-anchor',
matching the other paths.
- Line 19: The locale key names in the guideIndex component are mismatched:
replace every use of the nonstandard keys 'jp' and 'kr' (including object keys
like kr: 'Bubblegum V1' and any checks such as locale === 'jp' or locale ===
'kr') with the correct keys 'ja' and 'ko' to match LocaleContext (which returns
'ja' and 'ko'); update all occurrences in the component (e.g., the locale
mapping object and the locale checks/conditionals in the render logic) so Korean
and Japanese translations render correctly.
- Line 28: Replace the local navigation implementation in guideIndex.jsx by
importing getLocalizedHref from '@/config/languages' and Link from 'next/link',
remove the local getLocalizedPath() function, and swap all native <a> usages
(notably the guide links around the code that previously used paths like
'/docs/...') to next/Link components that call getLocalizedHref(...) for their
href; also strip the '/docs/' prefix from those guide path strings
(next/Link/basePath handles it) so Link receives the localized, prefixed href
via getLocalizedHref and you get SPA navigation and preserved scroll position.

---

Outside diff comments:
In `@public/llms.txt`:
- Around line 1-589: The public llms.txt file was manually edited but is
auto-generated; revert any manual changes to llms.txt and instead apply your
edits to the generator or its sources: update the generation script
generate-llms-txt.mjs or the source markdown files used by that script (the "en"
pages), then run the canonical build step (node generate-llms-txt.mjs && next
build) so the file is regenerated correctly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1178c35b-11a6-4356-b6d9-4ab280e6c524

📥 Commits

Reviewing files that changed from the base of the PR and between 91e6968 and 68f026a.

📒 Files selected for processing (2)
  • public/llms.txt
  • src/components/helperComponents/guideIndex.jsx

en: 'Bubblegum V1',
jp: 'Bubblegum V1',
kr: 'Bubblegum V1'
kr: 'Bubblegum V1',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check what locale values are used in the LocaleContext
echo "=== Checking LocaleContext locale values ==="
fd -e js -e jsx LocaleContext --exec cat {} 2>/dev/null | head -50

echo ""
echo "=== Checking locale usage in other components ==="
rg -n "locale === ['\"]" src/ --type js --type jsx -C 1 | head -30

Repository: metaplex-foundation/developer-hub

Length of output: 1868


🏁 Script executed:

cat -n src/components/helperComponents/guideIndex.jsx | sed -n '15,35p; 420,440p'

Repository: metaplex-foundation/developer-hub

Length of output: 1452


Critical: Fix locale key mismatch that breaks Korean and Japanese translations.

The component uses jp and kr as locale keys (lines 19, 26, etc.), but the LocaleContext returns 'ja' for Japanese and 'ko' for Korean. The locale checks at lines 430 (locale === 'jp') and 432 (locale === 'kr') will never match, preventing Korean and Japanese content from rendering.

Change all jp keys to ja and all kr keys to ko to align with the locale values provided by LocaleContext.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/helperComponents/guideIndex.jsx` at line 19, The locale key
names in the guideIndex component are mismatched: replace every use of the
nonstandard keys 'jp' and 'kr' (including object keys like kr: 'Bubblegum V1'
and any checks such as locale === 'jp' or locale === 'kr') with the correct keys
'ja' and 'ko' to match LocaleContext (which returns 'ja' and 'ko'); update all
occurrences in the component (e.g., the locale mapping object and the locale
checks/conditionals in the render logic) so Korean and Japanese translations
render correctly.

Comment thread src/components/helperComponents/guideIndex.jsx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
src/components/helperComponents/guideIndex.jsx (2)

452-454: 🧹 Nitpick | 🔵 Trivial

Use next/Link with getLocalizedHref() for consistent SPA navigation.

Native <a> tags cause full page reloads. The codebase consistently uses next/Link with getLocalizedHref() from @/config/languages for navigation (Header, Footer, Grid components). This also means the local getLocalizedPath() function (lines 422-425) can be removed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/helperComponents/guideIndex.jsx` around lines 452 - 454, The
anchor tag here causes full page reloads; replace the native <a> with next/Link
and pass the localized SPA href using getLocalizedHref(guide.path) (keep the
display text from getLocalizedText(guide.name)); update the import to pull in
Link and getLocalizedHref from their modules if missing and ensure the Link
wraps the getLocalizedText output, and remove the now-unused local helper
getLocalizedPath() (lines where getLocalizedPath is defined) to avoid
duplication.

18-19: ⚠️ Potential issue | 🔴 Critical

Locale key mismatch: jp and kr should be ja and ko.

The LocaleContext returns 'ja' for Japanese and 'ko' for Korean, but this component uses 'jp' and 'kr' throughout (lines 18-19, 25-26, 46-47, 55-56, 83-84, etc.). The locale checks at lines 430 and 432 (locale === 'jp', locale === 'kr') will never match, breaking Korean and Japanese translations.

Replace all jp keys with ja and all kr keys with ko.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/helperComponents/guideIndex.jsx` around lines 18 - 19, The
component uses nonstandard locale keys 'jp' and 'kr' which never match the
LocaleContext's 'ja' and 'ko'; update every occurrence of the 'jp' and 'kr'
locale keys and comparisons in guideIndex.jsx (including the translation mapping
object entries and any checks like locale === 'jp' / locale === 'kr') to use
'ja' and 'ko' respectively so the LocaleContext matches correctly (ensure you
update all occurrences in strings, object keys, and conditional comparisons such
as those currently checking locale).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/helperComponents/guideIndex.jsx`:
- Line 28: In src/components/helperComponents/guideIndex.jsx update the guide
objects' path properties to remove the "/docs/" prefix (e.g., change
"/docs/smart-contracts/..." to "/smart-contracts/..."); locate where the array
of guides is defined and update every "path" string (the one shown for the
million-NFT guide) to match the actual pages under src/pages/en
(smart-contracts/, solana/, dev-tools/), ensuring no routes include the "/docs/"
prefix so routing/middleware resolves correctly.

---

Duplicate comments:
In `@src/components/helperComponents/guideIndex.jsx`:
- Around line 452-454: The anchor tag here causes full page reloads; replace the
native <a> with next/Link and pass the localized SPA href using
getLocalizedHref(guide.path) (keep the display text from
getLocalizedText(guide.name)); update the import to pull in Link and
getLocalizedHref from their modules if missing and ensure the Link wraps the
getLocalizedText output, and remove the now-unused local helper
getLocalizedPath() (lines where getLocalizedPath is defined) to avoid
duplication.
- Around line 18-19: The component uses nonstandard locale keys 'jp' and 'kr'
which never match the LocaleContext's 'ja' and 'ko'; update every occurrence of
the 'jp' and 'kr' locale keys and comparisons in guideIndex.jsx (including the
translation mapping object entries and any checks like locale === 'jp' / locale
=== 'kr') to use 'ja' and 'ko' respectively so the LocaleContext matches
correctly (ensure you update all occurrences in strings, object keys, and
conditional comparisons such as those currently checking locale).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e453b3fa-e88a-445a-a44b-7db376b72c57

📥 Commits

Reviewing files that changed from the base of the PR and between 68f026a and 4e085be.

📒 Files selected for processing (1)
  • src/components/helperComponents/guideIndex.jsx

kr: 'Solana에서 100만 NFT 만들기',
},
path: '/smart-contracts/bubblegum/guides/javascript/how-to-create-1000000-nfts-on-solana',
path: '/docs/smart-contracts/bubblegum/guides/javascript/how-to-create-1000000-nfts-on-solana',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== Checking if /docs/ directory exists in pages ==="
fd -t d "docs" src/pages --max-depth 3

echo ""
echo "=== Checking actual page structure under src/pages/en ==="
tree src/pages/en -L 2 -d 2>/dev/null || ls -la src/pages/en/ 2>/dev/null || echo "Cannot find src/pages/en"

echo ""
echo "=== Checking if smart-contracts pages exist ==="
fd -t d "smart-contracts" src/pages --max-depth 4

echo ""
echo "=== Checking middleware redirect patterns ==="
rg -n "docs" src/middleware.js | head -20 || echo "No /docs/ handling found in middleware"

Repository: metaplex-foundation/developer-hub

Length of output: 1058


🏁 Script executed:

cat -n src/components/helperComponents/guideIndex.jsx | sed -n '20,35p'

Repository: metaplex-foundation/developer-hub

Length of output: 664


🏁 Script executed:

rg -n "/docs/" src/components/helperComponents/guideIndex.jsx | head -10

Repository: metaplex-foundation/developer-hub

Length of output: 980


Remove the /docs/ prefix from guide paths—pages are not located under a /docs/ directory.

The page structure in src/pages/en/ contains directories like smart-contracts/, solana/, and dev-tools/ directly. Adding the /docs/ prefix (e.g., /docs/smart-contracts/bubblegum/guides/javascript/...) breaks routing because:

  • No /docs/ directory exists in the pages structure
  • The middleware has no handling for /docs/ prefix rewriting
  • These paths will attempt to access non-existent pages and return 404 errors

The paths should remain as /smart-contracts/..., /solana/..., /dev-tools/... without the prefix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/helperComponents/guideIndex.jsx` at line 28, In
src/components/helperComponents/guideIndex.jsx update the guide objects' path
properties to remove the "/docs/" prefix (e.g., change
"/docs/smart-contracts/..." to "/smart-contracts/..."); locate where the array
of guides is defined and update every "path" string (the one shown for the
million-NFT guide) to match the actual pages under src/pages/en
(smart-contracts/, solana/, dev-tools/), ensuring no routes include the "/docs/"
prefix so routing/middleware resolves correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant