Skip to content

fix: improve docs header and MDX link loading#21

Merged
leiysky merged 1 commit into
mainfrom
codex/docs-header-logo-priority
Jun 16, 2026
Merged

fix: improve docs header and MDX link loading#21
leiysky merged 1 commit into
mainfrom
codex/docs-header-logo-priority

Conversation

@leiysky

@leiysky leiysky commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Mark the fixed docs header logo image as priority so Next preloads it instead of treating it as lazy content.
  • Render internal MDX content links through Next Link for client-side navigation while keeping true external, hash-only, and mail links as normal anchors.

Root cause

The docs header logo is above the fold, but next/image emitted it without priority. MDX links also fell back to plain <a> because the shared MDX component map did not override anchors.

Validation

  • pnpm build
  • Verified production .next/server/app/index.html includes a scopedb-logo image preload and the fixed header logo no longer has loading="lazy".
  • Verified in a browser against next start -p 3336: clicking /guides/ingest-events from /guides/quickstart changed routes with zero additional document requests.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
scopedb-docs a4ecb21 Commit Preview URL

Branch Preview URL
Jun 16 2026, 02:10 PM

@leiysky leiysky marked this pull request as ready for review June 16, 2026 14:17
Copilot AI review requested due to automatic review settings June 16, 2026 14:17

Copilot AI left a comment

Copy link
Copy Markdown

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 improves initial render performance of the docs header by marking the above-the-fold logo as a priority next/image, ensuring it is preloaded rather than lazily fetched.

Changes:

  • Set the header logo <Image /> to priority so Next.js emits an image preload and avoids loading="lazy" for that asset.

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

@leiysky leiysky merged commit d8aecc4 into main Jun 16, 2026
3 checks passed
@leiysky leiysky deleted the codex/docs-header-logo-priority branch June 16, 2026 14:22
@leiysky leiysky changed the title fix: prioritize docs header logo image fix: improve docs header and MDX link loading Jun 16, 2026
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