Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an "edit this page" button to the docs #11642

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mgoin
Copy link

@mgoin mgoin commented Feb 19, 2025

Summary

It's useful to be able to immediately get to the source of a page on the docs to contribute edits, so this PR aims to add this as a button on each page.

Test Plan

Will test in the PR build

@zanieb
Copy link
Member

zanieb commented Feb 19, 2025

Thanks for contributing! You can test the documentation locally with uvx --with-requirements docs/requirements.txt -- mkdocs serve -f mkdocs.public.yml

Looks like this renders as

Screenshot 2025-02-19 at 3 37 03 PM

The branch name is wrong though

Screenshot 2025-02-19 at 3 37 24 PM

I'm not entirely sure we want this, but an open to discussion. cc @charliermarsh

@mgoin
Copy link
Author

mgoin commented Feb 19, 2025

Thanks so much for the prompt testing instructions! With the addition of edit_uri: blob/main/docs/, it seems to redirect to the right place

Screenshot 2025-02-19 at 5 08 38 PM

Clicking on the edit button on this page takes you to https://github.com/astral-sh/uv/blob/main/docs/index.md

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