Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Short description of the changes made

When a productgroup has a landing page with a custom slug (e.g., slug: /welcome), the routing logic in findNode now checks if the requested slug matches the productgroup's landing page before falling back to the first product. Products still take precedence over landing pages if there is a slug collision.

What was the motivation & context behind this PR?

When users configure a landing page with a custom slug in a productgroup site:

landing-page:
  page: Landing
  path: docs/pages/landingpage.mdx
  slug: /welcome

Visiting /welcome would incorrectly fall back to the first product instead of showing the landing page. The routing logic was checking for product matches but not checking if the slug matched the productgroup's landing page.

How has this PR been tested?

  • Lint checks pass (pnpm lint:biome, pnpm format)
  • Unit tests pass (pnpm test)

Human review checklist

  • Verify the redirect logic is correct - when slug === landingPageSlug, we return a redirect to the same slug. Is this the intended behavior, or should this return a "found" result instead?
  • Consider if there are edge cases with slug normalization (e.g., leading slashes)
  • Test with an actual productgroup site that has a custom landing page slug

Link to Devin run: https://app.devin.ai/sessions/a94aac2622a84fcbbb79d574f06d9eba
Requested by: [email protected]

When a productgroup has a landing page with a custom slug (e.g., slug: /welcome),
the routing logic now correctly checks for the landing page before falling back
to the first product. Products still take precedence over landing pages if there
is a slug collision.

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link
Contributor

vercel bot commented Dec 30, 2025

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

Project Deployment Review Updated (UTC)
dev.ferndocs.com Ready Ready Preview Jan 5, 2026 11:45pm
fern-dashboard Ready Ready Preview Jan 5, 2026 11:45pm
fern-dashboard-dev Ready Ready Preview Jan 5, 2026 11:45pm
prod-assets.ferndocs.com Ready Ready Preview Jan 5, 2026 11:45pm
prod.ferndocs.com Ready Ready Preview Jan 5, 2026 11:45pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
fern-platform Ignored Ignored Jan 5, 2026 11:45pm

@github-actions
Copy link
Contributor

github-actions bot commented Dec 30, 2025

🌱 Smoke Test Preview

Run at: 2026-01-05 23:43:24 UTC

Testing branch changes with smoke test content:

🕷️ Smoke Test Crawler Results

Pages crawled: 49
Successful: 49 ✅
With errors: 0

🎉 All pages loaded successfully with no errors!

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.

2 participants