Add example for using your own Github integration
parent
e70ac65ea5
commit
1c1d845280
|
@ -8,6 +8,22 @@ Github Integration
|
|||
|
||||
We now support linking to GitHub by default in the sidebar. It links to the page on GitHub, and directly links to the edit view as well. This should help people quickly update typos and send pull requests to contribute to project documentation.
|
||||
|
||||
If you want to integrate this into your own theme, the following variables are available in your custom templates:
|
||||
|
||||
* github_user
|
||||
* github_repo
|
||||
* github_version
|
||||
* display_github
|
||||
|
||||
It can be used like this::
|
||||
|
||||
{% if display_github %}
|
||||
<li><a href="https://github.com/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}.rst">
|
||||
Show on GitHub</a></li>
|
||||
<li><a href="https://github.com/{{ github_user }}/{{ github_repo }}/edit/{{ github_version }}{{ conf_py_path }}{{ pagename }}.rst">
|
||||
Edit on GitHub</a></li>
|
||||
{% endif %}
|
||||
|
||||
Screenshot
|
||||
~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Reference in New Issue