Skip to content

Commit

Permalink
docs: "Edit on GitHub" button (#1831)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Jan 8, 2024
1 parent 1a329b9 commit 481cc83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,5 +255,11 @@

{%- block footer %} {% endblock %}

{% 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>
{% endif %}

</body>
</html>
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,9 @@ def setup(app):
html_context = {
"fixpath": fixpath,
"get_versions": get_versions,
"display_github": True,
"github_user": "ApeWorX",
"github_repo": "ape",
"github_version": "main",
"conf_py_path": "/docs/",
}

0 comments on commit 481cc83

Please sign in to comment.