Much like how GitHub does it: display an "Edit" button at source file views. Clicking it brings up an inline editor that you can use to edit the source file in-place. Saving the file creates a commit to the repository, or if you don't have enough privileges to push to the repo then create a fork and commit to that.
You can also think about this as generalizing the Wiki. Practically the Wiki would be a repo that has Markdown compiling support in addition to the standard repositories.
What do you think?