Repository navigation
docusaurus-plugin-suggest-edits: let readers suggest edits without a Git account #13023
Hi all 👋
I've published docusaurus-plugin-suggest-edits, a plugin that lets readers suggest edits to your docs from the page itself. They edit the Markdown, review a diff and submit, and the change shows as a pull request on GitHub or Azure DevOps.
Readers don't need a Git account or access to your repo. That was the problem I was trying to solve, because the built-in "Edit this page" link in Docusaurus doesn't help when the repo is private, or when your readers aren't developers.
How it works
- The plugin publishes each page's Markdown with your build and replaces the edit button with an in-page editor
- A small server (serverless function or Node) checks the suggestion and opens the PR through a service account
- PRs branch from the exact commit the site was built from, to prevent suggestions from overwriting newer changes
- A prose-only check means readers can change text, but not frontmatter, imports, components or
{...}expressions - Optional sign-in (Azure Static Web Apps), plus rate limits
Status
It's early (0.1.0). It needs somewhere to run the server and write access to your repo. So far it’s been tested with Azure Static Web Apps, GitHub and Azure DevOps. Netlify and Vercel support, a quicker setup, and sign-in without personal access tokens (a managed identity for Azure DevOps, a GitHub App for GitHub) are next.
- npm: https://www.npmjs.com/package/docusaurus-plugin-suggest-edits
- GitHub: https://github.com/ManKindCoffee/docusaurus-plugin-suggest-edits
Feedback welcome
I'd especially like to hear:
- where you host your docs, so I know which serverless platforms to support next
- whether you'd want sign-in, anonymous submissions, or both
- anything that gets in the way of trying it
Thanks!
All reactions
Replies: 1 comment
0.2.0 is out: Azure DevOps without personal access tokens, using a managed identity.