Skip to content

Fix the docs "View & Edit" link - #43073

Merged
julien-deramond merged 1 commit into
mainfrom
main-jd-view-edit-link-to-main
Oct 13, 2026
Merged

julien-deramond merged 1 commit into
mainfrom
main-jd-view-edit-link-to-main

Conversation

@julien-deramond

Copy link
Copy Markdown
Member

The "View & Edit" link on every v6 docs page was a 404. Astro's glob() loader gives docs entries an id without the file extension, so the link pointed at .../site/src/content/docs/getting-started/install instead of .../getting-started/install.mdx. The link now adds .mdx and points at main instead of the v6.0.0-alpha.1 tag, since GitHub won't let anyone edit a file from a tag.

Closes #43060.

What was done

  • One line in site/src/components/PageMeta.astro: blob/v${current_version}/site/src/content/docs/${id} became blob/main/site/src/content/docs/${id}.mdx.
  • All 141 docs pages are .mdx (no .md left under site/src/content/docs), so a fixed extension is enough. Checked blob/main/site/src/content/docs/components/button (404) against .../button.mdx (200).
  • Left the other blob/v[[config:current_version]] links (contribute and approach pages) and the Example/Code shortcodes alone: they are source links tied to the released version, and the issue doesn't cover them.
  • Kept blob rather than GitHub's edit/main/... URL, as v5 does, because the label is "View & Edit".
  • Not run: the docs build and linting. The change is a string in a template.

How to review

  • Try it: npm run docs-dev, open any docs page (for example Getting started → Install), click "View & Edit", and check that it opens https://github.com/twbs/bootstrap/blob/main/site/src/content/docs/getting-started/install.mdx with GitHub's edit (pencil) button.

🤖 Generated with Claude Code

@julien-deramond julien-deramond added the docs Documentation site and its content label Oct 13, 2026
@julien-deramond
julien-deramond marked this pull request as ready for review October 13, 2026 17:20
…at main

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@julien-deramond
julien-deramond force-pushed the main-jd-view-edit-link-to-main branch from 11d1972 to c709999 Compare October 13, 2026 17:21
@julien-deramond julien-deramond added the v6 v6, the main branch label Oct 13, 2026
@julien-deramond

Copy link
Copy Markdown
Member Author

@mdo FYI I chose for now to not apply this change manually to gh-pages as I suppose it's not that a problem right now. But if you think it would be better, especially because it's an alpha to help folks contributing, feel free to ping me here, and I'll do the changes.

@julien-deramond
julien-deramond merged commit 1531588 into main Oct 13, 2026
13 checks passed
@julien-deramond
julien-deramond deleted the main-jd-view-edit-link-to-main branch October 13, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation site and its content v6 v6, the main branch

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

v6: GitHub "View & Edit" link currently broken in docs

1 participant