Skip to content

Fix "Edit page" link on stub pages and hide it on search pages#405

Merged
vvlladd28 merged 1 commit into
mainfrom
fix/edit-page-link-stubs
May 21, 2026
Merged

Fix "Edit page" link on stub pages and hide it on search pages#405
vvlladd28 merged 1 commit into
mainfrom
fix/edit-page-link-stubs

Conversation

@vvlladd28
Copy link
Copy Markdown
Member

Summary

  • Thin product stubs (pages with exactly 1 @includes/... import and 1 JSX component call) now point the "Edit page" link at the shared _includes/...mdx file where the prose actually lives, instead of the thin stub the reader can't meaningfully edit. Detection runs in the existing route middleware, reads each source file at most once (cached per filePath), and adds ~40 ms to a full build (3205 files × ~13 µs).
  • Composition pages with multiple @includes imports or multiple JSX calls (e.g. PE / Trendz install guides that fan a single include into many <DockerSection section="…" /> calls) are left alone — their structure lives in the stub itself.
  • Adds editUrl: false to the 13 per-product Search Results pages, which render only a search widget and have no editable prose.
  • Normalizes the two mobile/releases stubs from ~/content/_includes/... to the canonical @includes/... import shape so the stub-detection regex stays single-pattern.

Thin product stubs (1 @includes import + 1 JSX call) now route the
"Edit page" link to the shared _includes file where the prose lives,
instead of the stub the reader can't meaningfully edit. Composition
pages with their own structure are unaffected.

Also disables the link on the 13 per-product Search Results pages,
which have no editable prose, and normalizes the two mobile/releases
stubs to the canonical `@includes/...` import shape.
@vvlladd28 vvlladd28 merged commit 67279fd into main May 21, 2026
4 of 5 checks passed
@vvlladd28 vvlladd28 deleted the fix/edit-page-link-stubs branch May 21, 2026 15:23
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