Skip to content

fix(docs-site): remove duplicated src/ in GitHub edit link#733

Merged
ako merged 1 commit into
mendixlabs:mainfrom
Andries-Smit:fix/docs-edit-url-duplicate-src
Jul 7, 2026
Merged

fix(docs-site): remove duplicated src/ in GitHub edit link#733
ako merged 1 commit into
mendixlabs:mainfrom
Andries-Smit:fix/docs-edit-url-duplicate-src

Conversation

@Andries-Smit

@Andries-Smit Andries-Smit commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The "Suggest an Edit" button Top right on the documentation site does not work.
https://www.mxcli.org/

Summary

  • The docs site's "Edit this page" link pointed to .../edit/main/docs-site/src/src/<page> (duplicated src) instead of .../edit/main/docs-site/src/<page>.
  • mdBook resolves {path} in edit-url-template relative to the book root (docs-site/), which already includes the src/ prefix — so the template's hardcoded docs-site/src/{path} doubled it up.
  • Fix: change the template to docs-site/{path} in docs-site/book.toml.

Test plan

  • mdbook build docs-site (or mdbook serve docs-site) and confirm the "Edit this page" link on a page (e.g. migration README) now points to .../edit/main/docs-site/src/migration/README.md with no duplicated src.

…plate

mdBook resolves {path} relative to the book root (docs-site/), which
already includes the src/ prefix, so the template was producing
.../docs-site/src/src/<page> instead of .../docs-site/src/<page>.

@ako ako left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified locally: building docs-site with the current template produces edit links with a duplicated src (.../docs-site/src/src/...) — in mdBook v0.5.2 the {path} placeholder already includes the src/ prefix. This fix (docs-site/{path}) resolves to the correct file path (e.g. docs-site/src/appendixes/changelog.md), fixing the broken "Suggest an Edit" link. Thanks!

@ako ako merged commit de0ff62 into mendixlabs:main Jul 7, 2026
4 checks passed
This was referenced Jul 7, 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