Skip to content

Commit

Permalink
docs: add "page source" link to sphinx documentation
Browse files Browse the repository at this point in the history
Add a link to the top of the sidebar in every docs page that takes the
user back to the source code in gitlab.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20201102130926.161183-5-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
berrange authored and huth committed Nov 10, 2020
1 parent d0f26e6 commit 704a256
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/_templates/editpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="editpage">
<ul>
<li><a href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/{{pagename}}.rst">Page source</a></li>
</ul>
</div>
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
html_sidebars = {
'**': [
'about.html',
'editpage.html',
'navigation.html',
'searchbox.html',
]
Expand Down
5 changes: 5 additions & 0 deletions docs/devel/_templates/editpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="editpage">
<ul>
<li><a href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/{{pagename}}.rst">Page source</a></li>
</ul>
</div>
5 changes: 5 additions & 0 deletions docs/interop/_templates/editpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="editpage">
<ul>
<li><a href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/interop/{{pagename}}.rst">Page source</a></li>
</ul>
</div>
5 changes: 5 additions & 0 deletions docs/specs/_templates/editpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="editpage">
<ul>
<li><a href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/specs/{{pagename}}.rst">Page source</a></li>
</ul>
</div>
5 changes: 5 additions & 0 deletions docs/system/_templates/editpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="editpage">
<ul>
<li><a href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/system/{{pagename}}.rst">Page source</a></li>
</ul>
</div>
5 changes: 5 additions & 0 deletions docs/tools/_templates/editpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="editpage">
<ul>
<li><a href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/tools/{{pagename}}.rst">Page source</a></li>
</ul>
</div>
5 changes: 5 additions & 0 deletions docs/user/_templates/editpage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="editpage">
<ul>
<li><a href="https://gitlab.com/qemu-project/qemu/-/blob/master/docs/user/{{pagename}}.rst">Page source</a></li>
</ul>
</div>

0 comments on commit 704a256

Please sign in to comment.