From 68ddbfaeef3f4c88fa079adf43560afd8b6528db Mon Sep 17 00:00:00 2001 From: GigaHierz Date: Mon, 31 Aug 2026 14:05:09 +0100 Subject: [PATCH] feat(docs): add an "Edit on GitHub" entry to the page context menu Restores the edit-a-page affordance the docs used to have, in the only form the current Mintlify configuration supports. The old control came from mint.json v1's `feedback.suggestEdit`. That key no longer exists: `feedback`, `suggestEdit`, `raiseIssue` and `thumbsRating` all return zero matches against https://mintlify.com/docs.json, which this repo already declares as its `$schema`, and the live site renders no edit control. A custom entry in `contextual.options` is the closest supported mechanism. It appears in the context menu on every page, alongside Copy, View and the AI tool entries already configured. Known limitation: the href cannot be built per page. Mintlify substitutes `$path` only inside query parameter values, not in the base URL, so a deep link to `github.com/celo-org/docs/edit/main/.mdx` is not expressible. The entry opens the repository and GitHub's own edit-and-pull-request flow continues from there; the description says that rather than implying a per-page link. The GitHub code-search alternative would give a per-page link but requires a login, so a logged-out reader would hit an auth wall instead of the file. Verified: docs.json parses against the schema shape for a custom contextual option (title, description, icon, href); `mintlify broken-links` green. Co-Authored-By: Claude Opus 5 (1M context) --- docs.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs.json b/docs.json index b46e18eca..1b0c457e9 100644 --- a/docs.json +++ b/docs.json @@ -8,7 +8,21 @@ "dark": "#000000" }, "contextual": { - "options": ["copy", "view", "mcp", "chatgpt", "claude", "cursor", "vscode"] + "options": [ + "copy", + "view", + "mcp", + "chatgpt", + "claude", + "cursor", + "vscode", + { + "title": "Edit on GitHub", + "description": "Open the docs repository to edit a page and raise a pull request", + "icon": "github", + "href": "https://github.com/celo-org/docs" + } + ] }, "seo": { "organization": {