Add "edit link" support to MkDocs theme.

Theme shows either a repo link or an edit link depending on whether
`edit_uri` is set. Also clarified documentation that this behavior is
dependant upon theme support. Fixes #1129.
This commit is contained in:
Jesse Kinkead
2017-10-10 16:42:53 -07:00
committed by Waylan Limberg
parent 84906a7a6c
commit 3f98d1deb3
3 changed files with 18 additions and 4 deletions

View File

@@ -57,9 +57,11 @@ page, accounting for specifics of the repository host (e.g. GitHub, Bitbucket,
etc), the branch, and the docs directory itself. Mkdocs concatenates `repo_url`
and `edit_uri`, and appends the input path of the page.
When set, provides a link directly to the page in your source repository. This
makes it easier to find and edit the source for the page. If `repo_url` is not
set, this option is ignored.
When set, and if your theme supports it, provides a link directly to the page in
your source repository. This makes it easier to find and edit the source for the
page. If `repo_url` is not set, this option is ignored. On some themes, setting
this option may cause an edit link to be used in place of a repository link.
Other themes may show both links.
For example, for a GitHub-hosted repository, the `edit_uri` would be as follows.
(Note the `edit` path and `master` branch...)